GCC mainline failures with ld testsuite
Andreas Jaeger
aj@suse.de
Sat Mar 9 08:56:00 GMT 2002
Andreas Schwab <schwab@suse.de> writes:
> Andreas Jaeger <aj@suse.de> writes:
>
> |> Since GCC mainline now places zero initialized data in .bss instead
> |> .data, some of the elfweak tests fail on i686-linux if you use GCC
> |> mainline for compilation:
> |>
> |> Running /cvs/binutils-mainline/src/ld/testsuite/ld-elfweak/elfweak.exp ...
> |> FAIL: ELF DSO weak data first
> |> FAIL: ELF DSO weak data last
> |> FAIL: ELF weak data first
> |> FAIL: ELF weak data last
> |>
> |> >From the log file:
> |> builds/sourceware-src/build-binutils-ln/ld/ld-new -m elf_i386 -o tmpdir/libfoo
> |> .so -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc/
> |> 3.2-devel/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtbegin.o --shared tmpdir/foo1a.o
> |> tmpdir/bar1a.o /opt/gcc/3.2-devel/lib/gcc-lib/i686-pc-linux-gnu/3.2/libgcc.a -L
> |> /usr/lib -lc /opt/gcc/3.2-devel/lib/gcc-lib/i686-pc-linux-gnu/3.2/libgcc.a /opt/
> |> gcc/3.2-devel/lib/gcc-lib/i686-pc-linux-gnu/3.2/crtend.o /usr/lib/crtn.o
> |> /builds/sourceware-src/build-binutils-ln/ld/../binutils/objdump --dynamic-syms t
> |> mpdir/libfoo.so | grep foo$ > tmpdir/objdump.out
> |> tmpdir/objdump.out: 0: 00001c8c g DO .bss 00000004 Base de
> |> allocate_foo
> |> FAIL: ELF DSO weak data last
> |>
> |> How can we fix the test properly without changing its semantics?
>
> How about matching both .bss and .data, or initializing it with non-zero?
Initializing with non-zero would involve further changes since the
programs test for zero/non-zero.
The testsuite passes if I make the following change.
Ok to commit?
Andreas
2002-03-09 Andreas Jaeger <aj@suse.de>
* ld-elfweak/strongdata.sym: Allow bss section for GCC 3.2 that
places zero initialized data in the bss.
* ld-elfweak/lddsodata.dsym: Likewise.
============================================================
Index: src/ld/testsuite/ld-elfweak/strongdata.sym
--- testsuite/ld-elfweak/strongdata.sym 25 Sep 2001 20:24:00 -0000 1.2
+++ testsuite/ld-elfweak/strongdata.sym 9 Mar 2002 16:49:45 -0000
@@ -1,2 +1,2 @@
-[0-9a-f]*[ ]+g[ ]+O[ ]+.(s|)data[ ]+[0-9a-f]*[ ]+deallocate_foo
+[0-9a-f]*[ ]+g[ ]+O[ ]+.((s|)data|bss)[ ]+[0-9a-f]*[ ]+deallocate_foo
[0-9a-f]*[ ]+g[ ]+F[ ]+.text[ ]+[0-9a-f]*[ ]+(0x[0-9a-f]*|)[ ]*foo
============================================================
Index: src/ld/testsuite/ld-elfweak/dsodata.dsym
--- testsuite/ld-elfweak/dsodata.dsym 25 Sep 2001 20:24:00 -0000 1.2
+++ testsuite/ld-elfweak/dsodata.dsym 9 Mar 2002 16:49:45 -0000
@@ -1,2 +1,2 @@
-[0-9a-f]*[ ]+g[ ]+DO[ ]+.(s|)data[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)deallocate_foo
+[0-9a-f]*[ ]+g[ ]+DO[ ]+.((s|)data|bss)[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)deallocate_foo
[0-9a-f]*[ ]+g[ ]+DF[ ]+.text[ ]+[0-9a-f]*[ ]+(Base[ ]+|[ ]*)(0x[0-9a-f]*|)[ ]*foo
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Binutils
mailing list