aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2007-11-01 11:45:20 +0000
committerJoseph Myers <joseph@codesourcery.com>2007-11-01 11:45:20 +0000
commite6c6c8f39cff8723dae7c737eba79f1365a2ed1b (patch)
treeb8efd23109dca6ff556affe705c4faf984d326a9 /ld
parent96f2030e25e865286f3417372dab977005aff45b (diff)
downloadgdb-e6c6c8f39cff8723dae7c737eba79f1365a2ed1b.zip
gdb-e6c6c8f39cff8723dae7c737eba79f1365a2ed1b.tar.gz
gdb-e6c6c8f39cff8723dae7c737eba79f1365a2ed1b.tar.bz2
bfd:
* merge.c (sec_merge_hash_lookup): Add parameter sec_end. Check for unterminated strings. All callers changed. (record_section): Add parameter abfd. Give error message for unterminated strings. (_bfd_merge_sections): Update call to record_section. (_bfd_write_merged_section, _bfd_merged_section_offset): Handle NULL secinfo from merge failures. ld/testsuite: * ld-elf/merge3.d, ld-elf/merge3.s: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog4
-rw-r--r--ld/testsuite/ld-elf/merge3.d3
-rw-r--r--ld/testsuite/ld-elf/merge3.s7
3 files changed, 14 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 49e55ad..b8b5b2b 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-01 Joseph Myers <joseph@codesourcery.com>
+
+ * ld-elf/merge3.d, ld-elf/merge3.s: New.
+
2007-10-30 Nick Clifton <nickc@redhat.com>
* ld-mn10300/mn10300.exp: Run new tests. Skip i126256 test if
diff --git a/ld/testsuite/ld-elf/merge3.d b/ld/testsuite/ld-elf/merge3.d
new file mode 100644
index 0000000..20d30ca
--- /dev/null
+++ b/ld/testsuite/ld-elf/merge3.d
@@ -0,0 +1,3 @@
+#source: merge3.s
+#ld: -T merge.ld
+#error: unterminated string in section `.rodata.str' marked for merging
diff --git a/ld/testsuite/ld-elf/merge3.s b/ld/testsuite/ld-elf/merge3.s
new file mode 100644
index 0000000..25709be
--- /dev/null
+++ b/ld/testsuite/ld-elf/merge3.s
@@ -0,0 +1,7 @@
+ .section .rodata.str,"aMS","progbits",1
+.LC0:
+ .ascii "abcd"
+ .text
+ .global _start
+_start:
+ .long .LC0