aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-06-09 04:52:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-06-09 04:52:15 +0000
commit240077501163f169043c1d87ce05cd57f0e9ee3a (patch)
treefb6ec993fc0b8832f3ee562ccc8849c4cae36e0e /ld
parent61220854262b44474cf3e95f7594d69a73fbb63a (diff)
downloadgdb-240077501163f169043c1d87ce05cd57f0e9ee3a.zip
gdb-240077501163f169043c1d87ce05cd57f0e9ee3a.tar.gz
gdb-240077501163f169043c1d87ce05cd57f0e9ee3a.tar.bz2
Check relocations in note sections for --gc-sections.
bfd/ 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> PR ld/12851 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here. (bfd_elf_gc_sections): Also check SHT_NOTE sections. ld/testsuite/ 2011-06-08 H.J. Lu <hongjiu.lu@intel.com> PR ld/12851 * ld-elf/pr12851.d: New. * ld-elf/pr12851.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-elf/pr12851.d14
-rw-r--r--ld/testsuite/ld-elf/pr12851.s5
3 files changed, 25 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 31d542d..dcefc10 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12851
+ * ld-elf/pr12851.d: New.
+ * ld-elf/pr12851.s: Likewise.
+
2011-06-07 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/elf.exp: Build symbol3.a and symbol3w.a.
diff --git a/ld/testsuite/ld-elf/pr12851.d b/ld/testsuite/ld-elf/pr12851.d
new file mode 100644
index 0000000..84aa59a
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr12851.d
@@ -0,0 +1,14 @@
+#source: pr12851.s
+#source: start.s
+#ld: --gc-sections
+#readelf: -s --wide
+#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-*
+#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: cr16-*-* crx-*-*
+# generic linker targets don't support --gc-sections, nor do a bunch of others
+# cr16 and crx use non-standard scripts with memory regions, which don't play
+# well with unique group sections under ld -r.
+
+#...
+ +.* _.stapsdt.base
+#pass
diff --git a/ld/testsuite/ld-elf/pr12851.s b/ld/testsuite/ld-elf/pr12851.s
new file mode 100644
index 0000000..784b91f
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr12851.s
@@ -0,0 +1,5 @@
+ .section .note.stapsdt,"?","note"
+ .dc.a _.stapsdt.base
+ .section .stapsdt.base,"a","progbits"
+_.stapsdt.base: .space 1
+ .size _.stapsdt.base,1