Providing C level symbols via linker scripts

Will Newton will.newton@imgtec.com
Tue Mar 21 15:00:00 GMT 2006


Hi all,

I maintain an as yet unreleased binutils port for an architecture that
prepends an underscore to symbol names defined in C (for legacy
reasons). This is normally not a problem, but some software e.g. uClibc
wishes to reference symbols defined in the linker scripts such as
__init_array_start, but because they are referenced in C the symbol
referenced is actually ___init_array_start (i.e. 3 leading underscores
rather than 2). This results in an undefined symbol at link time.
Obviously I can hack the uClibc code to get the right symbol, but I was
wondering if there was a better solution to this problem? Do other
architectures have this problem e.g. sh?

Thanks,

(apologies for the excessive footer)



More information about the Binutils mailing list