473,624 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiler segments

Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????

Mar 8 '07 #1
8 2620
karthik.infoguy wrote:
Any one just let me know what are the different segments in a compiler
and what data are stored in different segments????
I have no idea what you mean by "segments in a compiler". Could you
elaborate?

Mar 8 '07 #2
On Mar 8, 9:32 pm, "karthik.infogu y" <karthik.infogu ...@gmail.com>
wrote:
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????
Are you asking different phases of compilation?

Mar 8 '07 #3
On Mar 8, 9:34 pm, Rolf Magnus <ramag...@t-online.dewrote:
karthik.infoguy wrote:
Any one just let me know what are the different segments in a compiler
and what data are stored in different segments????

I have no idea what you mean by "segments in a compiler". Could you
elaborate?
Are you asking about different phases of compilation?

Mar 8 '07 #4
"karthik.infogu y" <ka************ ***@gmail.comwr ote in message
news:11******** **************@ 8g2000cwh.googl egroups.com...
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????
I think you are ocnfusing your terms. A compiler is a program that compiles
a program into object code which is then linked into an executable by a
linker, sometimes by the compiler itself.

Just what is your question?
Mar 8 '07 #5
karthik.infoguy wrote:
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????
I wonder if the OP is talking about this

http://world.std.com/~swmcd/steven/rants/pc.html

Gosh it takes me back, programmers today don't know they're born.

john
Mar 8 '07 #6
On Mar 8, 4:32 am, "karthik.infogu y" <karthik.infogu ...@gmail.com>
wrote:
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????
Segments are a platform-specific linkage concept, not a C++ concept.

Consult the reference documentation for your tools.

Mar 8 '07 #7
On Mar 8, 12:02 pm, "Jim Langston" <tazmas...@rock etmail.comwrote :
"karthik.infogu y" <karthik.infogu ...@gmail.comwr ote in message

news:11******** **************@ 8g2000cwh.googl egroups.com...
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????

I think you are ocnfusing your terms. A compiler is a program that compiles
a program into object code which is then linked into an executable by a
linker, sometimes by the compiler itself.
That object code is typically organized into sections or segments.
Code goes into a code or "text" section, static read/write data into a
data section, data which can be initialized to zero bits into yet
another section and so on. A C++ compiler may use special sections due
to its linkage model for inline functions and other data which may be
generated more than once in different compilation units and have to be
merged. Special sections may be used for pointers to the constructor
and destructor stubs, so that when these are collected together into a
section, they form a table that can be iterated over to do the call-
outs. All of this is very platform-specific, of course.



>
Just what is your question?

Mar 8 '07 #8
karthik.infoguy wrote:
Any one just let me know what are the different segments in a compiler
and what data
are stored in different segments????
Segments, in linking terminology, are a concept for organizing a
translation unit's code and data. This is not required by the C++
language, but added on by many compilers and linkers. There is no
official standard either.

Some common segments:
text -- could contain read only data.
code -- the executable code
read/write -- run-time variables

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
Mar 9 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2011
by: Jeremy Cowles | last post by:
I am trying to understand (and failing) how code segments work. I have the following code: segment .text global _asm_main _asm_main: enter 0,0 ; setup routinepusha
8
1824
by: grundmann | last post by:
Hello, i got a strange compiler error. When compiling the following: // forward declarations typedef AvlTree<LineSegment,LineSegmentComperator> LSTree; void handleEventPoint (const EventPoint& , LSTree& , double&, std::list<IntersectionPoint>& );
233
8300
by: E. Robert Tisdale | last post by:
I have access to a wide variety of different platforms here at JPL and they all have pretty good C 99 compilers. Some people claim that they have not moved to the new standard because of the lack of C 99 compliant compilers. Is this just a lame excuse for back-sliding?
15
1726
by: Gregg Woodcock | last post by:
My compiler (m68k-gcc) does not allow this (simplified example; not my real code) and I don't see why not: { char *arrayCharPtr1 = {"a", "ab", NULL}; char *arrayCharPtr2 = {"A", "AB", NULL}; char *arrayCharPtrVar = ((someBoolean) ? arrayCharPtr1 : arrayCharPtr2); // <-error here! StrCopy(someString, arrayCharPtr); }
55
12790
by: Steve | last post by:
I have to develop several large and complex C++ hardware test programs that should work under DOS, most likely with 32-bit DOS extender. Development workstation OS would be Microsoft XP. Quite some time ago I worked in DOS, with Borland BC++ 4.1. I do not have it any more. Which compiler would you recommend me now? Which ones support serious DOS program development? Criterion should be number of available free library modules (graphic menu...
0
958
by: keithb | last post by:
How to set up Treeview so that segments opened by user remain open until closed by user. Thanks, Keith
5
1486
by: pavi | last post by:
Hi, I want to understand how the C's executable a.out is organised into segments. Which segments the varibles are put into according to their declarations. which Linux commands are used to check these details. Kindly anyone suggest any books or documents or link which contains details of the above. Regards, Praveen Kumar A.S
1
9647
by: phantom2850 | last post by:
hello friends, I recently attended 3 interviews, all three had similar questions... Where is const stored? what are diff segments? what is heap? where is it on RAM/ROM? what is stored in stack? what is relation b/w Segments and RAM/ROM/FLASH Can someone suggest me some tutorial for this?
0
1217
by: aaragon | last post by:
Hello everybody, I have an interesting problem for which I still don't have a solution. Imagine that you're working with points in two-dimesional space, so the point class should be (simplifying): class Point { double x_,y_;
0
8242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8681
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8629
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7170
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4183
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1793
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.