ld --gc-sections failures
Alan Modra
alan@SPRI.Levels.UniSA.Edu.Au
Thu Jan 27 04:16:00 GMT 2000
On Thu, 27 Jan 2000, Alan Modra wrote:
> I'm getting a ld testsuite failure for --target=i586-linux. It's been
> around for a while.
> foo__1B == 0x08048090
> FAIL: selective4
The more I look at this, the more I think the test-suite is broken, and
gcc, as, and ld are all doing the right thing. I'm not very literate in
c++ though.
Could some c++ expert take a look at ld/testsuite/ld-selective/3.cc and
verify that the comments are correct? Specifically that void B::foo() { }
should be kept?
If so then the following patch will fix the ld testsuite.
--- ld/testsuite/ld-selective/selective.exp~ Wed Nov 3 00:22:34 1999
+++ ld/testsuite/ld-selective/selective.exp Thu Jan 27 22:29:10 2000
@@ -134,22 +134,28 @@
fail $test4
} else {
if ![ld_nm $nm tmpdir/3.x] {
- unresolved $test4
+ unresolved $test4
} else {
- if {[info exists nm_output(foo__1B)]} {
- send_log "foo__1B == $nm_output(foo__1B)\n"
- verbose "foo__1B == $nm_output(foo__1B)"
- fail $test4
- } else {
- if {[ info exists nm_output(bar__1A)]} {
- send_log "bar__1A== $nm_output(_bar__1A)\n"
- verbose "bar__1A == $nm_output(_bar__1A)"
- fail $test4
- } else {
- pass $test4
- }
- }
- }
+ if { ![info exists nm_output(foo__1A)]} {
+ send_log "foo__1A missing\n"
+ verbose "foo__1A missing"
+ fail $test4
+ } else {
+ if { ![info exists nm_output(foo__1B)]} {
+ send_log "foo__1B missing\n"
+ verbose "foo__1B missing"
+ fail $test4
+ } else {
+ if {[info exists nm_output(bar__1A)]} {
+ send_log "bar__1A== $nm_output(_bar__1A)\n"
+ verbose "bar__1A == $nm_output(_bar__1A)"
+ fail $test4
+ } else {
+ pass $test4
+ }
+ }
+ }
+ }
}
if { ![ld_compile "$CC $cflags $cxxflags" $srcdir/$subdir/4.cc tmpdir/4.o]} {
More information about the Binutils
mailing list