layout of c code image/binary in memory

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi folks,

 I want to understand how exactly is an image(compiled
c code and loaded into memory) stored in memory.

 What exactly is a linker script?

 I work with a lot of c code on a daily basis but I really
 don't understand :

 How exactly the sections
 like "text,bss,data etc."
 work?

 What exactly are they?

 I believe the linker script describes this layout.

 What exactly is a 'bundled image'?

 What exactly is 'microcode'?
 What exactly is 'firmware'?

 I admit I use these terms myself pretty often,but
 without much clarity.

 Anyways any information or pointers(internet urls) in
 this regard would be very helpful.

 If it helps,my work involves a lot of driver code
 in C on systems using MIPS processors.

Thanks a bunch....


Re: layout of c code image/binary in memory
On 19 Jan 2006 02:44:07 -0800 in comp.arch.embedded, "tele-commuter"

Quoted text here. Click to load it

Way too vague.  I can't begin to answer.

Quoted text here. Click to load it

Generally a text file the linker uses to determine at what locations
code and data may be located.

Quoted text here. Click to load it

As always, the answer is "it depends."  Generally, "text" is code and
bss is uninitialized static data.  Also generally, the BSS section is
filled with zeroes by the program startup code, or by the operating
system if there is one.

A good resource for some of this info is Levine's "Linkers and
Loaders."  If your local library doesn't have it, Amazon or Bookpool
should.

Quoted text here. Click to load it

It locates the sections in the memory map.  Sometimes the locations
are absolute, and sometimes they are relative.  The linker script may
have other functions as well, though.

Quoted text here. Click to load it

I can only guess.  So I won't.  Google might help.

Quoted text here. Click to load it

Code internal to a processor that sequences the micro-operations to
carry out each instruction.

Quoted text here. Click to load it

Almost as difficult a question as "What is real-time?"  Generally,
it's software that the user doesn't change or install, though there
are exceptions.

HTH,
                                        -=Dave

--
Change is inevitable, progress is not.

Re: layout of c code image/binary in memory
On 19 Jan 2006 02:44:07 -0800, "tele-commuter"

Quoted text here. Click to load it

    [ S N I P ]


Quoted text here. Click to load it




God help us!



Site Timeline