[patch/rfc] force linker hash style in linker tests

Mike Frysinger vapier@gentoo.org
Fri Mar 19 22:24:00 GMT 2010


many linker tests rely on sysv being the default (and only) hash style due to
either different symbol behavior (linker bug 11355) or symbol ordering.  so
force the default hash style since this is what everyone tests against and
what the test output expects.

perhaps the better way to address this is declare a global linker flag
variable and stick these things there ?  there doesnt seem to be an example
for me to piggy back off of in the linker test framework ...

2010-03-19  Mike Frysinger  <vapier@gentoo.org>

	* lib/ld-lib.exp (default_ld_relocate): Add --hash-style=sysv.
	(default_ld_link): Likewise.
	(default_ld_simple_link): Likewise.

--- binutils/ld/testsuite/lib/ld-lib.exp
+++ binutils/ld/testsuite/lib/ld-lib.exp
@@ -84,7 +84,7 @@
     global HOSTING_EMU
 
     remote_file host delete $target
-    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU -o $target -r $objects"]
+    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -o $target -r $objects"]
 }
 
 # Check to see if ld is being invoked with a non-endian output format
@@ -158,7 +158,7 @@
 
     remote_file host delete $target
 
-    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"]
+    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv $flags -o $target $objs $libs"]
 }
 
 # Link a program using ld, without including any libraries.
@@ -189,7 +189,7 @@
 
     remote_file host delete $target
 
-    set exec_output [run_host_cmd "$ld" "$flags -o $target $objects"]
+    set exec_output [run_host_cmd "$ld" "--hash-style=sysv $flags -o $target $objects"]
     set exec_output [prune_warnings $exec_output]
 
     # We don't care if we get a warning about a non-existent start
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20100319/f5b57545/attachment.sig>


More information about the Binutils mailing list