* [PATCH] Apply ld-arm/gc-hidden-1 to all ELF targets, not just *eabi* targets
@ 2014-02-27 21:54 Roland McGrath
0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2014-02-27 21:54 UTC (permalink / raw)
To: binutils
The ld-arm/gc-hidden-1.d test has "target: arm*-*-*eabi*" and so it is not
getting tested on ELF ARM targets that don't have eabi in the OS name.
Other ELF-only test cases in that directory have no "target:" line
and instead just a "not-target:" line that excludes a list of targets
intended to cover all the non-ELF cases.
This changes that case to use the same target selection as all the other
similar cases in that directory.
This makes it start being run for arm-nacl targets, which are ELF (and even
EABI-based), but don't have eabi anywhere in the name. On arm-nacl
targets, the address space layout is different so overly-specific regexps
embedding particular addresses do not match. Those addresses have nothing
to do with what this case is trying to test, so I generalized the regexps
to be indifferent to the exact addresses. With these changes, the test
passes for arm-nacl targets.
No regressions in 'make check-ld' on both trunk and 2.24 branch.
OK for trunk and 2.24 branch?
Thanks,
Roland
ld/testsuite/
2014-02-27 Roland McGrath <mcgrathr@google.com>
* ld-arm/gc-hidden-1.d: Remove target, add not-target to match
other ELF-only tests in this directory. Loosen regexps so they
don't care what the exact addresses are.
--- a/ld/testsuite/ld-arm/gc-hidden-1.d
+++ b/ld/testsuite/ld-arm/gc-hidden-1.d
@@ -1,9 +1,10 @@
-#target: arm*-*-*eabi*
#source: main.s
#source: gcdfn.s
#source: hidfn.s
#ld: --gc-sections --shared --version-script hideall.ld
#objdump: -dRT
+# This test is only valid on ELF based ports.
+# not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix*
# See PR ld/13990: a forced-local PLT reference to a
# forced-local symbol is GC'ed, trigging a BFD_ASSERT.
@@ -11,15 +12,15 @@
.*: file format elf32-.*
DYNAMIC SYMBOL TABLE:
-0+124 l d .text 0+ .text
+0+[0-9a-f]+ l d .text 0+ .text
0+ g DO \*ABS\* 0+ NS NS
Disassembly of section .text:
-0+124 <_start>:
- 124: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
- 128: eb000000 bl 130 <hidfn>
- 12c: e8bd8000 ldmfd sp!, {pc}
+0+[0-9a-f]+ <_start>:
+\s*[0-9a-f]+:\s+e52de004\s+push {lr} ; \(str lr, \[sp, #-4\]!\)
+\s*[0-9a-f]+:\s+eb000000\s+bl [0-9a-f]+ <hidfn>
+\s*[0-9a-f]+:\s+e8bd8000\s+ldmfd sp!, {pc}
-0+130 <hidfn>:
- 130: e8bd8000 ldmfd sp!, {pc}
+0+[0-9a-f]+ <hidfn>:
+\s*[0-9a-f]+:\s+e8bd8000\s+ldmfd sp!, {pc}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-27 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-27 21:54 [PATCH] Apply ld-arm/gc-hidden-1 to all ELF targets, not just *eabi* targets Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).