PowerPC EABI - prepending ecrti/crtbegin

Marco Awater marco.awater@acq.nl
Wed Mar 30 11:15:00 GMT 2011


Hello all,

Currently I'm working on updating our existing PowerPC EABI toolchain to 
a more recent one. We were using GCC 3.4.2, but I've now built a new GCC 
4.5.2 toolchain. Building the toolchain went without any hitches, but 
building an application for our target yielded unexpected results.

My platform is an embedded OS-less environment; I have my own vectors 
and bootcode. However, when building with the new GCC, ecrti.o and 
crtbegin.o get prepended to my own code thus messing up what is meant to 
be my vector table. The old compiler did not prepend these files and, 
apart from the compiler, no changes have been made to the build 
environment (the GCC flags are the same). I've done a fair bit of 
googling and digging, but I am unsure what the intended approach is for 
platforms such as mine.

Supplying -nostartfiles to the linker will stop the linker from 
prepending these files, but it also means I have to supply my own EABI 
constants (_SDA_BASE_ and co.). Is this the intended way to go about 
this? Note that I don't want or need the C++ 
(constructor/destructor/exception) support as provided by these extra 
files.

-- 
With kind regards,
Met vriendelijke groet,
     Marco Awater
     Software Engineer

------------------------------------------------------
AcQ Inducom, the Netherlands
T: +31 412 641922 / F: +31 412 622640
Email: marco.awater@acq.nl / Web: www.acq.nl

>>> people inventing technology
creating systems serving people >>>

------------------------------------------------------



More information about the Gcc-help mailing list