[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[eng@eipm.ch: mklibs doesn't manage to include symbol atexit]



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 ...

Cheers,
-- 
Raphaël Hertzog -+- http://www.ouaza.com
Formation Linux et logiciel libre : http://www.logidee.com
--- Begin Message ---
[ Please put me in cc in your answer so that I have a copy at work too,
thanks ]

Hello,

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.

$ 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

But mklibs doesn't manage to create the reduced library of libc6 with
the PIC version... it gets into an endless loop, and it repeats this
message :
Still need: atexit
417 symbols, 1 unresolved
[ and follows a new try to create a reduced version ]

The atexit function does exist in the PIC version, it's called
old_atexit.os :
$ ar t /usr/lib/libc_pic.a | grep atexit
cxa_atexit.os
old_atexit.os

So, do you have any idea why it doesn't get included ? And it's not even
mklibs fault because atexit is correctly requested but gcc/ld doesn't
include it in the generated libc :
$ gcc -nostdlib -nostartfiles -shared -Wl,-soname=libc.so.6 -uatexit
/usr/lib/libc_pic.a -o libc.so
$ objdump -T libc.so              

libc.so:     file format elf32-i386

objdump: libc.so: Invalid operation
$ readelf -s -W libc.so 
$ 
(if you try the same with another symbol than atexit, it works)

Cheers,
-- 
Raphaël Hertzog - EIPM SA


-- 
To UNSUBSCRIBE, email to debian-boot-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

--- End Message ---

Reply to: