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

Will Newton will.newton at gmail.com
Tue Jan 8 09:54:22 UTC 2008


On Jan 7, 2008 4:30 PM, Carmelo AMOROSO <carmelo.amoroso at st.com> wrote:
> Will Newton wrote:
> > Hi Bernd,
> >
> > (I hope I got the right email address here)
> >
> > I noticed commit 20613 prepends an underscore to the symbol name
> > passed to dlsym() if __UCLIBC_NO_UNDERSCORE__ is not defined. I was
> > wondering if you could explain the rationale behind this change?
> It seems to me the it's just the opposite....

Hmm, no, I think what I said is correct. If no underscores is NOT
defined then we prepend the underscore.

> +++ trunk/uClibc/ldso/include/dl-defs.h 2007-12-03 22:46:53 UTC (rev 20613)
> @@ -175,4 +175,10 @@
>  # define DL_MALLOC_ALIGN (__WORDSIZE / 8)
>  #endif
>
> +#ifdef __UCLIBC_NO_UNDERSCORES__
> +#define __C_SYMBOL_PREFIX__ ""
> +#else
> +#define __C_SYMBOL_PREFIX__ "_"
> +#endif
> +
>  #endif /* _LD_DEFS_H */
>
> or not?
> Carmelo
>



More information about the uClibc mailing list