This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/14170: ld: assertion fail bfd/linker.c:641
- From: Alan Modra <amodra at gmail dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: hjl dot tools at gmail dot com, binutils at sourceware dot org, echristo at apple dot com
- Date: Mon, 28 May 2012 13:36:51 +0930
- Subject: Re: PATCH: PR ld/14170: ld: assertion fail bfd/linker.c:641
- References: <20120526145937.GA25428@intel.com> <201205271922.q4RJMKeX010041@ignucius.se.axis.com>
On Sun, May 27, 2012 at 09:22:20PM +0200, Hans-Peter Nilsson wrote:
> This test-case fails for mipsisa32r2el-unknown-linux-gnu:
and other targets.
mips and xtensa fixed by tweaking the test a little. At a cursory
glance bfin and i370 failures look to be showing up real problems.
hppa64-hpux needs different .comm syntax so disable the test there.
tic6x complains about non-PIC, non-PID shared lib.
* ld-elf/pr14170a.s: Put foo, bar address in .data.
* ld-elf/elf.exp: Don't run pr14170 test on hppa64-hpux. Ignore
tic6x warnings.
Index: ld/testsuite/ld-elf/pr14170a.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/pr14170a.s,v
retrieving revision 1.1
diff -u -p -r1.1 pr14170a.s
--- ld/testsuite/ld-elf/pr14170a.s 27 May 2012 14:45:41 -0000 1.1
+++ ld/testsuite/ld-elf/pr14170a.s 28 May 2012 03:36:05 -0000
@@ -7,5 +7,7 @@ _start:
__start:
.global main /* Used by HPPA targets. */
main:
+
+ .data
.dc.a foo
.dc.a bar
Index: ld/testsuite/ld-elf/elf.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/elf.exp,v
retrieving revision 1.35
diff -u -p -r1.35 elf.exp
--- ld/testsuite/ld-elf/elf.exp 27 May 2012 14:45:41 -0000 1.35
+++ ld/testsuite/ld-elf/elf.exp 28 May 2012 03:36:05 -0000
@@ -57,6 +57,20 @@ if { ![istarget hppa64*-hpux*] } {
"" ""
{symbol3w.s} {} "symbol3w.a"}
}
+
+ if { [check_shared_lib_support] } then {
+ run_ld_link_tests {
+ {"Build pr14170a.o" "" "" "pr14170a.s" {} "pr14170.a" }
+ }
+ setup_xfail "tic6x-*-*"
+ run_ld_link_tests {
+ {"Build shared library for pr14170"
+ "-shared" "" "pr14170b.s" {} "pr14170.so" }
+ {"PR ld/14170"
+ "tmpdir/pr14170a.o tmpdir/pr14170.so" "" "pr14170c.s"
+ { } "pr14170" }
+ }
+ }
}
# Run a test to check linking a shared library with a broken linker
@@ -66,23 +80,15 @@ if { ![istarget hppa64*-hpux*] } {
#
# Only run the test on targets thats support creating shared libraries.
if { [check_shared_lib_support] } then {
- run_ld_link_tests {
- {"Build pr14170a.o" "" "" "pr14170a.s" {} "pr14170.a" }
- {"Build shared library for pr14170"
- "-shared" "" "pr14170b.s" {} "pr14170.so" }
- {"PR ld/14170"
- "tmpdir/pr14170a.o tmpdir/pr14170.so" "" "pr14170c.s"
- { } "a.out" }
- }
- setup_xfail "tic6x-*-*"
- run_ld_link_tests {
- {"Build shared library for next test"
- "-shared" "" "note-3.s" {} "note-3.so" }
- {"Link using broken linker script"
- "--script note-3.t tmpdir/note-3.so" "" ""
- { { ld "note-3.l" } }
- "a.out" }
- }
+ setup_xfail "tic6x-*-*"
+ run_ld_link_tests {
+ {"Build shared library for next test"
+ "-shared" "" "note-3.s" {} "note-3.so" }
+ {"Link using broken linker script"
+ "--script note-3.t tmpdir/note-3.so" "" ""
+ { { ld "note-3.l" } }
+ "a.out" }
+ }
}
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
--
Alan Modra
Australia Development Lab, IBM