Prepending underscores to symbol names in dlsym() (commit 20613)
Daniel Jacobowitz
drow at false.org
Tue Jan 8 16:06:05 UTC 2008
On Tue, Jan 08, 2008 at 03:58:00PM +0000, Will Newton wrote:
> 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.
There are pretty much no Unixes that do this; a few embedded Linux
ports are the only exceptions I've ever encountered.
If you have underscores, dlsym had better know about it, or
cross-platform code will break. Consider dlsym (libc_handle,
"printf"); every caller should not need to know about _printf.
--
Daniel Jacobowitz
CodeSourcery
More information about the uClibc
mailing list