diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-01-18 18:07:58 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-01-18 23:25:32 +0000 |
commit | 13338f4e1bdb2dbee5f767b47d192f68d411d5ab (patch) | |
tree | 0301ae1a61a6d90d6dc6b6781608350264eb5e65 | |
parent | 4030096d6a689125c026ce1e6300717c2050d105 (diff) | |
download | gdb-13338f4e1bdb2dbee5f767b47d192f68d411d5ab.zip gdb-13338f4e1bdb2dbee5f767b47d192f68d411d5ab.tar.gz gdb-13338f4e1bdb2dbee5f767b47d192f68d411d5ab.tar.bz2 |
PR ld/20995: MIPS: Set GAS flags correctly for tests
Complement commit 9acc85a62eb7 ("Use dynrelro for symbols in relro
sections too").
ld/
PR ld/20995
* testsuite/ld-elf/elf.exp: Set GAS flags correctly for the
`mips*-*-*' target and `pr20995' and `pr20995-2' tests.
(cherry picked from commit 6984613a53528c818482c3a531e17a86bac6e7dc)
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 27 |
2 files changed, 23 insertions, 10 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index da85561..0059bfa 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,11 @@ 2017-01-18 Maciej W. Rozycki <macro@imgtec.com> + PR ld/20995 + * testsuite/ld-elf/elf.exp: Set GAS flags correctly for the + `mips*-*-*' target and `pr20995' and `pr20995-2' tests. + +2017-01-18 Maciej W. Rozycki <macro@imgtec.com> + PR ld/20828 * testsuite/ld-elf/pr20828-1.sd: New test. * testsuite/ld-elf/pr20828-2a.sd: New test. diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index e8b2d64..cecd10b 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -83,6 +83,13 @@ if { ![istarget hppa64*-hpux*] } { # Only run these tests on targets that support creating shared libraries. if { [check_shared_lib_support] } then { + # This target requires extra GAS options when building non-PIC code + # for linking with shared libraries. + set AFLAGS_NONPIC "" + if [istarget "mips*-*-*"] { + append AFLAGS_NONPIC " -call_nonpic" + } + # Run a test to check linking a shared library with a broken linker # script that accidentally marks dynamic sections as notes. The # resulting executable is not expected to work, but the linker @@ -142,17 +149,17 @@ if { [check_shared_lib_support] } then { } # These targets don't copy dynamic variables into .bss. setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*" - run_ld_link_tests { - {"pr20995" - "" "tmpdir/pr20995.so" "" - {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995"} - } + run_ld_link_tests [list \ + [list \ + "pr20995" \ + "" "tmpdir/pr20995.so" "$AFLAGS_NONPIC" \ + {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995"]] setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*" - run_ld_link_tests { - {"pr20995-2" - "" "tmpdir/pr20995-2.so" "" - {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"} - } + run_ld_link_tests [list \ + [list \ + "pr20995-2" \ + "" "tmpdir/pr20995-2.so" "$AFLAGS_NONPIC" \ + {pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"]] } set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] |