[bitlug] Re: ELF??
- From: Pavan Chandrashekar - Sun Microsystems <Pavan.Chandrashekar@xxxxxxx>
- To: bitlug@xxxxxxxxxxxxx
- Date: Wed, 09 Nov 2005 13:06:50 +0530
Any body else interested in ELF stuff?? using it perhaps??
Interested?? In using ELF?? Oh..., should i say just *yes*? Bread and
butter man, as boss says :-) [pun intended]
DSP is binary, objcopy does that in a trice... but I need to know what
the compiler has done to create the object file, and modify that for my
architecture...
Ok. First of all, what do you use to build the ELF that you want to dump
onto the DSP? A cross compiler I suppose. And *no* shared objects, I
presume, unless you have some kind of Virtual MM on that DSP system you
are talking about.
Do you want to know how the object file (.o) is created or the
executable - static or shared?
Plain relocatable object files are created by the assembler with the
help of opcodes for instructions and the addressing formats that are
used for accessing data, and of course the data itself. Refer
Instruction formats for concerned architectures. How these contents are
placed into corresponding sections is something that is extremely
compiler specific.
For example, remember .rodata? GCC prevents the writing of data in this
section. The solaris CC also has the .rodata, but allows writing to data
in here.
Archives(.a) are created (using ar) by bundling the symbol information
from all the relocatable objects that are part of the archive into a
symbol table.
Shared objects are something that i am not very much aware of
(ironically). However, the usage of symbols whose definitions are in
shared objects need the runtime linker to manipulate the references to
point to the right definitions, at runtime.
And, just to be correct on the terminology, all these are done by the
link editor (ld).
TC
Other related posts: