aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/lib
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-19 07:17:21 +0000
committerAlan Modra <amodra@gmail.com>2011-10-19 07:17:21 +0000
commit1d5316ab67e12d6fb58c29728eb72fa937521e94 (patch)
tree7e30b8545d04c2270a9f16a224d93498c3896c32 /ld/testsuite/lib
parent371a586695a0e5d47ecfc014ecef4c657c046fca (diff)
downloadgdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.zip
gdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.tar.gz
gdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.tar.bz2
PR ld/13177
bfd/ * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark". (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test "mark". Hide undefweak too. Clear def_regular and ref_regular. * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved reloc errors from garbage-collected code. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. ld/testsuite/ * ld-elf/elf.exp: Move test for shared lib support.. * lib/ld-lib.exp (check_shared_lib_support): ..to here. Add m68hc1*, and s/ms1/mt/. (check_gc_sections_available): Match hppa*64 not hppa64. Comment. * ld-gc/libpersonality.s: New. * ld-gc/personality.s, * ld-gc/personality.d: New. * ld-gc/gc.exp: Run personality test.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r--ld/testsuite/lib/ld-lib.exp48
1 files changed, 47 insertions, 1 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 3e77a5a..e764591 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1418,7 +1418,7 @@ proc check_gc_sections_available { } {
|| [istarget or32-*-*]
|| [istarget pj*-*-*]
|| [istarget alpha-*-*]
- || [istarget hppa64-*-*]
+ || [istarget hppa*64-*-*]
|| [istarget i370-*-*]
|| [istarget i860-*-*]
|| [istarget ia64-*-*]
@@ -1439,6 +1439,8 @@ proc check_gc_sections_available { } {
}
# Check if the ld used by gcc supports --gc-sections.
+ # FIXME: this test is useless since ld --help always says
+ # --gc-sections is available
set ld_output [remote_exec host $ld "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } {
set gc_sections_available_saved 1
@@ -1449,6 +1451,50 @@ proc check_gc_sections_available { } {
return $gc_sections_available_saved
}
+# Returns true if -shared is supported on the target
+# Only used and accurate for ELF targets at the moment
+
+proc check_shared_lib_support { } {
+ if {![istarget arc-*-*]
+ && ![istarget avr-*-*]
+ && ![istarget cr16-*-*]
+ && ![istarget cris*-*-*]
+ && ![istarget crx-*-*]
+ && ![istarget d10v-*-*]
+ && ![istarget d30v-*-*]
+ && ![istarget dlx-*-*]
+ && ![istarget fr30-*-*]
+ && ![istarget frv-*-*]
+ && ![istarget h8300-*-*]
+ && ![istarget i860-*-*]
+ && ![istarget i960-*-*]
+ && ![istarget ip2k-*-*]
+ && ![istarget iq2000-*-*]
+ && ![istarget lm32-*-*]
+ && ![istarget m32c-*-*]
+ && ![istarget m32r-*-*]
+ && ![istarget m68hc1*-*-*]
+ && ![istarget mcore*-*-*]
+ && ![istarget mep-*-*]
+ && ![istarget microblaze-*-*]
+ && ![istarget mn10200-*-*]
+ && ![istarget moxie-*-*]
+ && ![istarget msp430-*-*]
+ && ![istarget mt-*-*]
+ && ![istarget openrisc-*-*]
+ && ![istarget or32-*-*]
+ && ![istarget pj-*-*]
+ && ![istarget rx-*-*]
+ && ![istarget spu-*-*]
+ && ![istarget v850*-*-*]
+ && ![istarget xstormy16-*-*]
+ && ![istarget *-*-irix*]
+ && ![istarget *-*-rtems] } {
+ return 1
+ }
+ return 0
+}
+
# Returns true if the target ld supports the plugin API.
proc check_plugin_api_available { } {
global plugin_api_available_saved