aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-02-01 12:05:25 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-02-01 12:05:25 +0000
commit273f4430f86503a7e746f8710c6165f794a360bd (patch)
treefc71715af5f5de20016d4a6f74e668c8dbf46734 /bfd
parent88a0e15ba8649517e8e0ee6bfaa2de668b167068 (diff)
downloadgdb-273f4430f86503a7e746f8710c6165f794a360bd.zip
gdb-273f4430f86503a7e746f8710c6165f794a360bd.tar.gz
gdb-273f4430f86503a7e746f8710c6165f794a360bd.tar.bz2
bfd/
* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove. (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs. ld/testsuite/ * ld-elf/eh-group2.s: New `.cfi_lsda' referencing `.gcc_except_table'. * ld-elf/eh-group.exp: New test and conditional defininiton of `ELF64'.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf-eh-frame.c30
2 files changed, 15 insertions, 20 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ba07018..c1f8a9b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
+ (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
+
2009-01-31 Alan Modra <amodra@bigpond.net.au>
* elflink.c (on_needed_list): New function.
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 579a6b8..3567c24 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -549,16 +549,6 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
< (bfd_size_type) ((buf) - ehbuf))) \
cookie->rel++
-#define REQUIRE_CLEARED_RELOCS(buf) \
- while (cookie->rel < cookie->relend \
- && (cookie->rel->r_offset \
- < (bfd_size_type) ((buf) - ehbuf))) \
- { \
- REQUIRE (cookie->rel->r_info == 0); \
- REQUIRE (cookie->rel->r_addend == 0); \
- cookie->rel++; \
- }
-
#define GET_RELOC(buf) \
((cookie->rel < cookie->relend \
&& (cookie->rel->r_offset \
@@ -817,16 +807,16 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
buf = last_fde + 4 + hdr_length;
- /* Cleared FDE? The instructions will not be cleared but verify all
- the relocation entries for them are cleared. */
- if (rsec == NULL)
- {
- REQUIRE_CLEARED_RELOCS (buf);
- }
- else
- {
- SKIP_RELOCS (buf);
- }
+ /* For NULL RSEC (cleared FDE belonging to a discarded section)
+ the relocations are commonly cleared. We do not sanity check if
+ all these relocations are cleared as (1) relocations to
+ .gcc_except_table will remain uncleared (they will get dropped
+ with the drop of this unused FDE) and (2) BFD already safely drops
+ relocations of any type to .eh_frame by
+ elf_section_ignore_discarded_relocs.
+ TODO: The .gcc_except_table entries should be also filtered as
+ .eh_frame entries; or GCC could rather use COMDAT for them. */
+ SKIP_RELOCS (buf);
}
/* Try to interpret the CFA instructions and find the first