aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2018-01-30 00:21:57 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-01-30 00:21:57 +0100
commit185cdb8cc7c0102140d41fb6272a5ee99994d72d (patch)
tree4809582a42e1aa16294890ca2ef941725a5cca1d /ld
parentd85815e2d16f7c042d7912f1fa85bf1b9c28ca44 (diff)
downloadgdb-185cdb8cc7c0102140d41fb6272a5ee99994d72d.zip
gdb-185cdb8cc7c0102140d41fb6272a5ee99994d72d.tar.gz
gdb-185cdb8cc7c0102140d41fb6272a5ee99994d72d.tar.bz2
Adjust test for PR ld/22269.
On the SPARC architecture, you need to pass a special flag to GNU as when you're assembling PIC/PIE code or else you get a wrong relocation for the GOT symbol. ld/ * testsuite/ld-elf/shared.exp (AFLAGS_PIC): Define on SPARC. (pr22269-1): Pass AFLAGS_PIC to the assembler.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/ld-elf/shared.exp6
2 files changed, 10 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c806643..c14c479 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
2018-01-29 Eric Botcazou <ebotcazou@adacore.com>
+ * testsuite/ld-elf/shared.exp (AFLAGS_PIC): Define on SPARC.
+ (pr22269-1): Pass AFLAGS_PIC to the assembler.
+
+2018-01-29 Eric Botcazou <ebotcazou@adacore.com>
+
* testsuite/ld-elf/pr22450.d: Remove reference to SPARC64.
2018-01-29 Maciej W. Rozycki <macro@mips.com>
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 5c4d78a..9b9cbaa 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -42,6 +42,10 @@ set AFLAGS_PIC ""
if [istarget "tic6x-*-*"] {
append AFLAGS_PIC " -mpic -mpid=near"
}
+if [istarget "sparc*-*-*"] {
+ append AFLAGS_PIC " -K PIC"
+}
+
# This target requires a non-default emulation for successful shared
# library/executable builds.
set LFLAGS ""
@@ -577,7 +581,7 @@ run_ld_link_tests [list \
"Build pr22269-1" \
"-pie -e _start --no-dynamic-linker -z text" \
"" \
- "" \
+ "$AFLAGS_PIC" \
{ pr22269-1.c } \
{{readelf -rW pr22269-1.rd}} \
"pr22269-1" \