Why is a __strtol_internal defined in dlfcn/eval.c?

H . J . Lu hjl@lucon.org
Fri Sep 7 09:23:00 GMT 2001


On Thu, Sep 06, 2001 at 11:49:40PM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > Why is a __strtol_internal defined in dlfcn/eval.c? There is one in
> > libc.
> 
> Because using the real implementation would require dragging in tons
> of stuff (like the entire locale implementation) into libdl.  Note the
> libdl is executable.  Don't worry about any such thing, it makes sense.

Well, I got

#  objdump --dynamic-sym /lib/libdl.so.2 | grep __strtol_internal
00000000  w   DF *UND*  000006ab  GLIBC_2.0   __strtol_internal

It looks like __strtol_internal is weak, undefined in /lib/libdl.so.2.
See

http://sources.redhat.com/ml/libc-alpha/2001-09/msg00039.html

If you really want __strtol_internal in libdl, you can have it in
libdl.a. But a weak __strtol_internal in libdl.so.2 won't be there
since libdl.so.2 is linked against libc.so.6.

H.J.



More information about the Libc-alpha mailing list