This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Providing C level symbols via linker scripts
- From: "Will Newton" <will dot newton at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Tue, 21 Mar 2006 14:27:00 -0000
- Subject: Providing C level symbols via linker scripts
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)