layout of c code image/binary in memory

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

Reply to
Loading thread data ...

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.
Reply to
Dave Hansen

[ S N I P ]

God help us!

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.