aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2008-01-09 09:36:11 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2008-01-09 09:36:11 +0000
commit184d07da89afd7b64fedf2360e9412f3f221b5f8 (patch)
tree86d884295ea4540e85611148f03072cca17887ae /ld
parent137033e97482d340139b1499c6db4236f35c8577 (diff)
downloadfsf-binutils-gdb-184d07da89afd7b64fedf2360e9412f3f221b5f8.zip
fsf-binutils-gdb-184d07da89afd7b64fedf2360e9412f3f221b5f8.tar.gz
fsf-binutils-gdb-184d07da89afd7b64fedf2360e9412f3f221b5f8.tar.bz2
bfd/
PR ld/5526 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged fields. Rename u.cie.u.merged to u.cie.u.merged_with. (eh_frame_sec_info): Add a cies field. (eh_frame_hdr_info): Add a merge_cies field. * elf-eh-frame.c (cie): Add a reloc_index member to the personality union. (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead of hdr_info->cies. (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of cie structures in all cases and use it instead of extended_cies. If merging, store the cie array in sec_info->cies and point each CIE's eh_fde_cie at the associated element. Do not try to calculate the value of the personality routine here; record the offset of the relocation instead. Do not merge CIEs here. (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here... (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead. (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE. (find_merged_cie): New function. (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies. ld/testsuite/ PR ld/5526 * ld-elf/eh6.s, ld-elf/eh6.d: New test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-elf/eh6.d17
-rw-r--r--ld/testsuite/ld-elf/eh6.s17
3 files changed, 39 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 5ae22d7..1eff242 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ PR ld/5526
+ * ld-elf/eh6.s, ld-elf/eh6.d: New test.
+
2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/5522
diff --git a/ld/testsuite/ld-elf/eh6.d b/ld/testsuite/ld-elf/eh6.d
new file mode 100644
index 0000000..7f4e47a
--- /dev/null
+++ b/ld/testsuite/ld-elf/eh6.d
@@ -0,0 +1,17 @@
+#source: eh6.s
+#ld: --gc-sections -shared
+#readelf: -wf
+#target: x86_64-*-linux-gnu i?86-*-linux-gnu
+
+The section .eh_frame contains:
+
+00000000 0000001[4c] 00000000 CIE
+ Version: 1
+ Augmentation: "zPR"
+ Code alignment factor: 1
+ Data alignment factor: .*
+ Return address column: .*
+ Augmentation data: 80 .* 1b
+
+ DW_CFA_nop
+#pass
diff --git a/ld/testsuite/ld-elf/eh6.s b/ld/testsuite/ld-elf/eh6.s
new file mode 100644
index 0000000..bdc7dd1
--- /dev/null
+++ b/ld/testsuite/ld-elf/eh6.s
@@ -0,0 +1,17 @@
+ .section .text.foo, "ax", @progbits
+ .globl foo
+ .type foo, @function
+foo:
+ .cfi_startproc simple
+ .cfi_personality 0x80, indirect_ptr
+ ret
+ .cfi_endproc
+ .size foo, . - foo
+
+ .section .data.rel.ro, "a", @progbits
+indirect_ptr:
+ .long my_personality_v0
+
+ .globl my_personality_v0
+my_personality_v0:
+ .long 0