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

libc reduction



Is here somebody around who groks library reduction?  I'm not getting
anywhere with it, lacking some background information and seem to be
blind all over.

The problem:

   __udivdi3 is in the reduced libc, while __divdi3 is not.
   This causes mke2fs to fail on plain files.

Some output (which I don't fully understand due to the lack of objdump
documentation)

/mnt is root1440.bin

finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies> objdump --dynamic-syms /mnt/lib/libc-2.1.3.so |grep divdi
00062330 g    DF .text  0000011a  GLIBC_2.0   __udivdi3

finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies> objdump --dynamic-syms /lib/libc-2.1.3.so |grep divdi
000c7230 g    DF .text  0000019f  GLIBC_2.0   __divdi3
000c7600 g    DF .text  0000011f  GLIBC_2.0   __udivdi3

finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies> objdump --syms /usr/lib/libc_pic.a |grep divdi
objdump: bsd-setjmp.os: no symbols
objdump: bsd-_setjmp.os: no symbols
00000000         *UND*  00000000 __divdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3
00000000         *UND*  00000000 __udivdi3

finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies> objdump --dynamic-syms /mnt/lib/libext2fs.so.2.4 |grep divdi
00000000      DF *UND*  0000019e  GLIBC_2.0   __divdi3
finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies> objdump --dynamic-syms /mnt/sbin/mke2fs |grep divdi
0804b1d0 g    DF .text  0000011a  Base        __udivdi3
finlandia!joey(tty5):/home/project/Debian/CVS/boot-floppies>

I guess that ".text" means the symbol is defined in that file
and that "*UND*" is just a reference to the symbol.  If so, the
symbol get's stripped off and I don't know why...

Letting mklibs.sh run on libext2, mke2fs and libc results in

undefined-symbol: __divdi3
undefined-symbol: __udivdi3

but not in provided symbols.

I'm giving up for the moment unless somebody gives me the required
hint.

Regards,

	Joey

-- 
Those who don't understand Unix are condemned to reinvent it, poorly.

Please always Cc to me when replying to me on the lists.



Reply to: