From: Roland McGrath <mcgrathr@google.com>
To: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: [PATCH] Apply ld-arm/gc-hidden-1 to all ELF targets, not just *eabi* targets
Date: Thu, 27 Feb 2014 21:54:00 -0000 [thread overview]
Message-ID: <CAB=4xhp8bY8qLdxVchp_8ODFuEhGQNGy404G4RCD4LWpdSAi-A@mail.gmail.com> (raw)
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}
reply other threads:[~2014-02-27 21:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB=4xhp8bY8qLdxVchp_8ODFuEhGQNGy404G4RCD4LWpdSAi-A@mail.gmail.com' \
--to=mcgrathr@google.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).