Prepending underscores to symbol names in dlsym() (commit 20613)

Will Newton will.newton at gmail.com
Tue Jan 8 15:58:00 UTC 2008


On Jan 8, 2008 3:44 PM, Mike Frysinger <vapier at gentoo.org> wrote:

> > http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/ldso/libdl/lib
> >dl.c?rev=20613&r1=20612&r2=20613
>
> the change looks correct to me, and it works on Blackfin, so ...
>
> i386/bits:#define __UCLIBC_NO_UNDERSCORES__
> libdl code:
> #ifndef __UCLIBC_NO_UNDERSCORES__
> <add _>
> #else
> <do not add _>
> #endif
>
> so on i386, the code path which prepends _ is not taken

Agreed, my question is whether or not adding the underscore is the
correct thing to do even if your architecture prepends an underscore
to symbol names? Is there a particular reason why this was done for
Blackfin, to make a particular app work? I am trying to find out what
the correct behaviour of dlsym is, for example does it behave like
this on other Unixes that have leading underscores on symbols.



More information about the uClibc mailing list