Tech Support > Computer Hardware > Microprocessors > layout of c code image/binary in memory
layout of c code image/binary in memory
Posted by tele-commuter on January 19th, 2006


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....

Posted by Dave Hansen on January 19th, 2006


On 19 Jan 2006 02:44:07 -0800 in comp.arch.embedded, "tele-commuter"
<anand.vamanamurthy@gmail.com> wrote:

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

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

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.

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.

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

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

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.

Posted by Alfie on January 19th, 2006


On 19 Jan 2006 02:44:07 -0800, "tele-commuter"
<anand.vamanamurthy@gmail.com> wrote:

[ S N I P ]





God help us!




Similar Posts