This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Providing C level symbols via linker scripts


On Tuesday 21 March 2006 09:27, Will Newton wrote:
> 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?

how is this a bug in uClibc ?  the C symbol name is "__init_array_start" thus 
your architecture should be providing "___init_array_start" via binutils ... 
unless you dont handle init/fini stuff, then just disable global constructors 
support in uClibc ...

> Do other architectures have this problem e.g. sh?

blackfin is the only arch i know of that utilizes the USER_PREFIX in gcc to 
prepend an underscore ... no standard linux arch utilizes a prefix 
(alpha/amd64/arm/hppa/ia64/m68k/mips/ppc/ppc64/s390/sh/sparc/x86)
-mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]