Re: [eng@eipm.ch: mklibs doesn't manage to include symbol atexit]
On Mon, Dec 16, 2002 at 10:53:06AM +0100, Raphael Hertzog wrote:
> Hello glibc/gcc maintainers,
>
> I have a problem with generating a reduced libc6 using the PIC version.
> I don't know if the problem comes from libc6, from gcc or from myself.
> I asked on debian-boot but nobody answered since the problem doesn't
> appear to come from mklibs bur rather glibc and/or gcc.
>
> Please take a quick look to the attached mail. I'd appreciate any
> idea to help me investigate further but right now I'm blocked because
> I don't know enough of glibc/gcc ...
> i'm using mklibs at work here and I have a problem with it. One of the
> binaries that I use (lilo-mtd) requires the symbol "atexit" and mklibs
> doesn't manage to include it in the libc6 generated from the -pic
> version.
First of all, if lilo-mtd were properly linked, then this wouldn't
happen. Look in /usr/lib/libc_nonshared.a, which is supposed to
provide the definition of atexit. Looks like your lilo-mtd hasn't been
recompiled in a Very Long Time.
Second of all,
> $ objdump -T tmp/empty/tree/sbin/lilo-mtd | grep atexit
> 08048edc DF *UND* 0000003e atexit
>
> This symbol is provided by the standard libc6 :
> $ objdump -T /lib/libc.so.6 | grep atexit
> 0010cc54 l d __libc_atexit 00000000
> 00028e30 g DF .text 00000034 (GLIBC_2.0) atexit
> 00028c74 g DF .text 00000045 GLIBC_2.1.3 __cxa_atexit
That means atexit is "hidden". It is not available for compile-time
linking. mklibs isn't handling that correctly; easier is to avoid it.
Looks like it needs to search libc_nonshared.a in addition to
libc_pic.a.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: