PPC EABI, section explanation
Bill Pringlemeir
bpringle@teklogix.com
Mon May 3 08:09:00 GMT 1999
" http://www3.chips.ibm.com/products/powerpc/library/eabi_app.pdf "
" http://www.esofta.com/pdfs/ppceabi.pdf "
If you need a .ps link, try a web search.
>>>>> "Kristian" == Kristian Otnes <ko@tandberg.no> writes:
Kristian> Hi, I have downloaded GCC and PowerPC libraries from
Kristian> www.objsw.com. (Thanks for providing that...)
Kristian> 1: Does anyone know where I can get a good explanation
Kristian> of the EABI interface, I have looked a bit around and
Kristian> can't say I have the full overview. I suppose I need to
Kristian> know a bit about it due to the compiler register usage
Kristian> and some existing assembly code that will be included.
Kristian> 2: Can anyone tell me where to find some documentation
Kristian> on some of the sections that gets included when I use
Kristian> the libraries. (I want to use stdio issues.) Some of
Kristian> them I know from earlier but some are not obvious to me
Kristian> and I do not relly know what sort of setup is
Kristian> required. The specific ones are:
Kristian> .fixup, .got, got2, sdata2
Kristian> I am currently working on a ROM based system, so I
Kristian> have to know which are static and not, and what to setup
Kristian> in the crt0 function.
.got stands for global offset table.
.sdata2 is short data. global data of small size is put in an area
where it can be accessed quickly. Most of these sections would be
explained in a document on the EABI. For instance R2 (no D2 on powerPC).
is used for 'const' small data area. R13 is used for read/write small
data area.
The GOT sections aren't used in a typical embedded applications from what
I underdand. They are more for when you have full blown operating system.
I believe they allow unresolved reference in your image. Like a DLL or
shared library, but you should read the spec to be sure.
Kristian> 3: So far I have been compiling with the -mno-eabi, if I
Kristian> drop it I obviously get some more functionality included
Kristian> (related to EABI setup etc.) But I also get a lot of
Kristian> unresolved names from the linker, probably related to
Kristian> start/end locations of sections:
Kristian> __SDATA_START__, __SBBS_END__, __GOT__START__,
Kristian> __GOT2_END__ and so on.
Kristian> Should I define these in the linker file? Where do I
Kristian> find any comments on them?
These are labels probably used by startup code. __SDATA_START__ start of
short RAM data. __SBBS_END__ end of zero RAM data. __GOT__START__,
__GOT2_END__ global offset table defines.
hth,
Bill Pringlemeir
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc
mailing list