aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-09-16 01:15:20 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-09-16 01:15:20 +0000
commitfd91d41947667d30f47b06c45cc57d4b4fcefade (patch)
treeda3232e7e4e059d4c297068470cab17acc047a84 /ld/testsuite
parentd0bc107f79526a1e11682f4633b8c9e467d654b0 (diff)
downloadgdb-fd91d41947667d30f47b06c45cc57d4b4fcefade.zip
gdb-fd91d41947667d30f47b06c45cc57d4b4fcefade.tar.gz
gdb-fd91d41947667d30f47b06c45cc57d4b4fcefade.tar.bz2
Check if a symbol is hidden by linker script.
bfd/ 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/12975 * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer to struct bfd_elf_version_tree. * elflink.c (elf_info_failed): Remove verdefs. (_bfd_elf_export_symbol): Updated. _bfd_elf_link_assign_sym_version): Likewise. (bfd_elf_size_dynamic_sections): Remove pointer to struct bfd_elf_version_tree. Updated. (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden by linker script. * linker.c (bfd_hide_sym_by_version): New. * bfd-in2.h: Regenerated. include/ 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/12975 * bfdlink.h (bfd_link_info): Add version_info. ld/ 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/12975 * ldlang.c (lang_elf_version_info): Removed. (lang_register_vers_node): Replace lang_elf_version_info with link_info.version_info. (lang_add_vers_depend): Likewise. * pe-dll.c (process_def_file_and_drectve): Likewise. * emultempl/solaris2.em (elf_solaris2_before_allocation): Likewise. * ldlang.h (lang_elf_version_info): Removed. * plugin.c (is_visible_from_outside): Check if symbol is hidden by version script. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Remove lang_elf_version_info. ld/testsuite/ 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/12975 * ld-elf/pr12975.d: New. * ld-elf/pr12975.s: Likewise. * ld-elf/pr12975.t: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-elf/pr12975.d10
-rw-r--r--ld/testsuite/ld-elf/pr12975.s10
-rw-r--r--ld/testsuite/ld-elf/pr12975.t6
4 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3c00fe4..7a90b26 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12975
+ * ld-elf/pr12975.d: New.
+ * ld-elf/pr12975.s: Likewise.
+ * ld-elf/pr12975.t: Likewise.
+
2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13178
diff --git a/ld/testsuite/ld-elf/pr12975.d b/ld/testsuite/ld-elf/pr12975.d
new file mode 100644
index 0000000..549e8d5
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr12975.d
@@ -0,0 +1,10 @@
+#ld: --gc-sections -shared -version-script pr12975.t
+#readelf: -s --wide
+#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-*
+#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+# generic linker targets don't support --gc-sections, nor do a bunch of others
+
+#failif
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +LOCAL +DEFAULT +[1-9]+ bar
+#...
diff --git a/ld/testsuite/ld-elf/pr12975.s b/ld/testsuite/ld-elf/pr12975.s
new file mode 100644
index 0000000..7429121
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr12975.s
@@ -0,0 +1,10 @@
+ .section .text.foo,"ax",%progbits
+ .globl foo
+ .type foo, %function
+foo:
+ .byte 0
+ .section .text.bar,"ax",%progbits
+ .type bar, %function
+ .globl bar
+bar:
+ .byte 0
diff --git a/ld/testsuite/ld-elf/pr12975.t b/ld/testsuite/ld-elf/pr12975.t
new file mode 100644
index 0000000..902c1f7
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr12975.t
@@ -0,0 +1,6 @@
+{
+global:
+ foo;
+local:
+ *;
+};