aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-04-22 21:37:48 +0000
committerJakub Jelinek <jakub@redhat.com>2002-04-22 21:37:48 +0000
commitaf40ce3c79bb7be880e2a25706f74675f92b79ff (patch)
tree7d37200fcb3ce4943d279ab7b8a688b5948e9fcd /bfd
parent52efde73b986abae90c478c68afb14dbf04629b8 (diff)
downloadgdb-af40ce3c79bb7be880e2a25706f74675f92b79ff.zip
gdb-af40ce3c79bb7be880e2a25706f74675f92b79ff.tar.gz
gdb-af40ce3c79bb7be880e2a25706f74675f92b79ff.tar.bz2
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
search table if some FDE is DW_EH_PE_aligned encoded either. (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf-eh-frame.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 78eec86..bc5543a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-22 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
+ search table if some FDE is DW_EH_PE_aligned encoded either.
+ (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
+
2002-04-22 Richard Smith <richard@ex-parrot.com>
Jakub Jelinek <jakub@redhat.com>
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 83ccfe9..6a23edb 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -636,8 +636,9 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
else
{
if (info->shared
- && (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr
- && cie.make_relative == 0)
+ && (((cie.fde_encoding & 0xf0) == DW_EH_PE_absptr
+ && cie.make_relative == 0)
+ || (cie.fde_encoding & 0xf0) == DW_EH_PE_aligned))
{
/* If shared library uses absolute pointers
which we cannot turn into PC relative,
@@ -1026,7 +1027,7 @@ _bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
}
}
}
- else
+ else if (sec_info->entry[i].size > 4)
{
/* FDE */
bfd_vma value = 0, address;
@@ -1099,6 +1100,9 @@ _bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
}
}
}
+ else
+ /* Terminating FDE must be at the end of .eh_frame section only. */
+ BFD_ASSERT (i == sec_info->count - 1);
BFD_ASSERT (p == contents + sec_info->entry[i].new_offset);
memmove (p, contents + sec_info->entry[i].offset,