+2017-02-25 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-elf/elf.exp: Xfail pr20995 tests on hppa64-hpux.
+ Set up HPUX defsym. Run pr14170 tests and build symbol3 objects,
+ defining HPUX where necessary. Define HPUX for implib tests.
+ * testsuite/ld-elf/comm-data4.d: Run for hpux.
+ * testsuite/ld-elf/endsym.d: Likewise.
+ * testsuite/ld-elf/linkoncerdiff.d: Likewise.
+ * testsuite/ld-elf/comm-data4.s: Add alternate .comm when HPUX.
+ * testsuite/ld-elf/comm-data5.s: Likewise.
+ * testsuite/ld-elf/endsym.s: Likewise.
+ * testsuite/ld-elf/pr14170c.s: Likewise.
+ * testsuite/ld-elf/symbol3.s: Likewise.
+ * testsuite/ld-elf/implib.s: Likewise. Don't start directives
+ in first column.
+ * testsuite/ld-elf/linkoncerdiff2.s: Don't use numeric labels.
+ * testsuite/ld-elf/warn3.d: Run for hpux.
+ * testsuite/ld-scripts/rgn-at10.d: Xfail for hpux.
+ * testsuite/ld-scripts/rgn-at11.d: Likewise.
+ * testsuite/ld-scripts/size-2.d: Remove xfail for hpux.
+
2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
* testsuite/ld-elf/ver_def.d: New test.
if { [istarget spu*-*-*] } {
set LDFLAGS "$LDFLAGS --local-store 0:0"
}
+
+# hpux .comm differs from everyone else
+set hpux ""
+set old_asflags $ASFLAGS
+if [istarget "*-*-hpux*"] {
+ set hpux "--defsym HPUX=1"
+ set ASFLAGS "$ASFLAGS --defsym HPUX=1"
+}
+
if { [istarget alpha*-*-* ] } {
# The compress1 test is written expecting 32-bit addresses; force the
# executable down into the low address space to match.
remote_download host merge.ld
}
-if { ![istarget hppa64*-hpux*] } {
+run_ld_link_tests [list \
+ [list "Build symbol3.a" \
+ "" "" $hpux \
+ {symbol3.s} {} "symbol3.a" ] \
+ [list "Build symbol3w.a" \
+ "" "" "" \
+ {symbol3w.s} {} "symbol3w.a" ] \
+]
+
+if { [check_shared_lib_support] } then {
run_ld_link_tests {
- {"Build symbol3.a"
- "" "" ""
- {symbol3.s} {} "symbol3.a"}
- {"Build symbol3w.a"
- "" "" ""
- {symbol3w.s} {} "symbol3w.a"}
+ {"Build pr14170a.o" "" "" "" {pr14170a.s} {} "pr14170.a" }
}
-
- if { [check_shared_lib_support] } then {
- run_ld_link_tests {
- {"Build pr14170a.o" "" "" "" "pr14170a.s" {} "pr14170.a" }
- }
- setup_xfail "tic6x-*-*"
- run_ld_link_tests {
- {"Build shared library for pr14170"
- "-shared" "" "" "pr14170b.s" {} "pr14170.so" }
- }
- # bfin does not currently support copy relocs.
- setup_xfail "bfin-*-*"
- run_ld_link_tests {
- {"PR ld/14170"
- "--no-dynamic-linker tmpdir/pr14170a.o tmpdir/pr14170.so" "" "" "pr14170c.s"
- { } "pr14170" }
- }
+ setup_xfail "tic6x-*-*"
+ run_ld_link_tests {
+ {"Build shared library for pr14170"
+ "-shared" "" "" "pr14170b.s" {} "pr14170.so" }
}
+ # bfin does not currently support copy relocs.
+ setup_xfail "bfin-*-*"
+ run_ld_link_tests [list \
+ [list "PR ld/14170" \
+ "--no-dynamic-linker tmpdir/pr14170a.o tmpdir/pr14170.so" "" $hpux \
+ {pr14170c.s} { } "pr14170" ] \
+ ]
}
# Only run these tests on targets that support creating shared libraries.
# xfail on arm*-*-eabi*. The list can be enlarged to those targets that
# don't support GNU_RELRO. For more details, please see discussions at:
# https://sourceware.org/ml/binutils/2017-01/msg00441.html
- setup_xfail "arm*-*-eabi*"
+ setup_xfail "arm*-*-eabi*" "hppa*64*-*-hpux*"
run_ld_link_tests {
{"Build pr20995-2.so"
"-shared -z relro" "" ""
}
# These targets don't copy dynamic variables into .bss.
setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*"
+ # or don't have .data.rel.ro
+ setup_xfail "hppa*64*-*-hpux*"
run_ld_link_tests [list \
[list \
"pr20995" \
# xfail on arm*-*-eabi* is particularly because of no support of GNU_RELRO.
# Please see the link above for details.
setup_xfail "alpha-*-*" "bfin-*-*" "ia64-*-*" "xtensa-*-*" "arm*-*-eabi*"
+ setup_xfail "hppa*64*-*-hpux*"
run_ld_link_tests [list \
[list \
"pr20995-2" \
}
# Check that the --out-implib option work correctly.
-run_ld_link_tests {
- {"Generate empty import library"
- "--out-implib=tmpdir/implib.lib" ""
- "--defsym NO_GLOBAL=1"
- {implib.s}
- {{ld empty-implib.out}}
- "implib"}
- {"Generate import library"
- "--out-implib=tmpdir/implib.lib" ""
- ""
- {implib.s}
- {{readelf {-s tmpdir/implib.lib} implib.rd}}
- "implib"}
-} $xfail_implib
+run_ld_link_tests [list \
+ [list "Generate empty import library" \
+ "--out-implib=tmpdir/implib.lib" "" \
+ [concat "--defsym NO_GLOBAL=1" $hpux] \
+ {implib.s} \
+ {{ld empty-implib.out}} \
+ "implib" ] \
+ [list "Generate import library" \
+ "--out-implib=tmpdir/implib.lib" "" \
+ $hpux \
+ {implib.s} \
+ {{readelf {-s tmpdir/implib.lib} implib.rd}} \
+ "implib" ] \
+] $xfail_implib
if { [istarget *-*-linux*]
|| [istarget *-*-nacl*]
}
set LDFLAGS $old_ldflags
+set ASFLAGS $old_asflags
# Check to see if the C compiler works
if { [which $CC] == 0 } {