Package: gcc-4.2 Version: 4.2.1-5 Severity: normal Tags: d-i To fix #433874, we needed to make mklibs aware of symbol versioning. In the process of doing this, some weird behavior with -u and versioned symbols was discovered.
Frans Pop found out that [EMAIL PROTECTED] could be used to force a specific version of a symbol to be included when reducing a library. Like this: [EMAIL PROTECTED]:~>gcc -nostdlib -nostartfiles -shared -Wl,-soname=libc.so.6 [EMAIL PROTECTED] -o out /usr/lib/libc_pic/soinit.o /usr/lib//libc_pic.a /usr/lib/libc_pic/sofini.o -Wl,--version-script=/usr/lib//libc_pic.map -lgcc /lib//ld-linux.so.2 [EMAIL PROTECTED]:~>objdump -T out |grep fopen 0000a1c0 g DF .text 00000157 (GLIBC_2.0) _IO_file_fopen 00017f50 g DF .text 000005eb GLIBC_2.1 _IO_file_fopen 00007a10 g DF .text 00000097 (GLIBC_2.0) _IO_fopen 00034d10 g DF .text 00000032 GLIBC_2.1 _IO_fopen 00007a10 g DF .text 00000097 (GLIBC_2.0) fopen 00034d10 g DF .text 00000032 GLIBC_2.1 fopen But this doesn't work for all symbols in glibc: [EMAIL PROTECTED]:~>gcc -nostdlib -nostartfiles -shared -Wl,-soname=libc.so.6 [EMAIL PROTECTED] -o out /usr/lib/libc_pic/soinit.o /usr/lib//libc_pic.a /usr/lib/libc_pic/sofini.o -Wl,--version-script=/usr/lib//libc_pic.map -lgcc /lib//ld-linux.so.2 [EMAIL PROTECTED]:~>objdump -T out | grep umask [EMAIL PROTECTED]:~> The difference seems to be that umask has only one version in glibc, GLIBC_2.0. Vs fopen which has 2 versions. This can be worked around by using -usymbol w/o a version for such symbols: [EMAIL PROTECTED]:~>gcc -nostdlib -nostartfiles -shared -Wl,-soname=libc.so.6 [EMAIL PROTECTED] -uumask -o out /usr/lib/libc_pic/soinit.o /usr/lib//libc_pic.a /usr/lib/libc_pic/sofini.o -Wl,--version-script=/usr/lib//libc_pic.map -lgcc /lib//ld-linux.so.2 [EMAIL PROTECTED]:~>objdump -T out | grep umask 00000f00 w DF .text 00000010 GLIBC_2.0 umask We've worked around this, but would like to at least know why the bahavior varies depending on the number of symbol versions. This brings me to the next, worse, problem: [EMAIL PROTECTED]:~>gcc -nostdlib -nostartfiles -shared -Wl,-soname=libslang.so.2 -uSLsmg_refresh -o foo /usr/lib//libslang_pic.a -lgcc -ldl -lm -lc /lib//ld-linux.so.2 [EMAIL PROTECTED]:~>objdump -T foo|grep SLsmg_refresh 0000d3d0 g DF .text 00000493 Base SLsmg_refresh So, I've asked it to include SLsmg_refresh, and gotten SLsmg_refresh, but with an undefined version. However, it normally looks like this: [EMAIL PROTECTED]:~>objdump -T /lib/libslang.so.2 | grep SLsmg_refresh 0004bcf0 g DF .text 00000493 SLANG2 SLsmg_refresh If the resulting libspang is used, bug #316525 results when running a program like nano that is linked to it. The program runs, but it's quite ugly. Why is the version information lost when reducing libslang? Is this some problem in libslang, or is it a problem you can fix? -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.22-2-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gcc-4.2 depends on: ii binutils 2.18-1 The GNU assembler, linker and bina ii cpp-4.2 4.2.1-5 The GNU C preprocessor ii gcc-4.2-base 4.2.1-5 The GNU Compiler Collection (base ii libc6 2.6.1-5 GNU C Library: Shared libraries ii libgcc1 1:4.2.1-5 GCC support library ii libgomp1 4.2.1-5 GCC OpenMP (GOMP) support library Versions of packages gcc-4.2 recommends: ii libc6-dev 2.6.1-5 GNU C Library: Development Librari ii libmudflap0-4.2-dev 4.2.1-5 GCC mudflap support libraries (dev -- no debconf information -- see shy jo
signature.asc
Description: Digital signature