diff options
author | Alan Modra <amodra@gmail.com> | 2014-09-12 09:35:42 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-09-12 09:44:09 +0930 |
commit | ae6c7e33e1510665e8e043eb11a71e59414efbf3 (patch) | |
tree | 505b0c39d85f07f8e385cb8d4f51846a94ce6ec3 /bfd/elf-bfd.h | |
parent | 18d60c2bd70855afa467f0d5d8f95b3e4d243cde (diff) | |
download | gdb-ae6c7e33e1510665e8e043eb11a71e59414efbf3.zip gdb-ae6c7e33e1510665e8e043eb11a71e59414efbf3.tar.gz gdb-ae6c7e33e1510665e8e043eb11a71e59414efbf3.tar.bz2 |
Test for overflow in eh_frame_hdr entries and for overlapping FDEs
With larger binaries on 64-bit systems, or indeed just binaries that
have a large gap between text and data, it is possible for the
.eh_frame_hdr lookup table entry values to overflow a signed 32-bit
relative offset. It is also a requirement for the glibc FDE lookup
code that only one FDE claim to cover any given address.
* elf-bfd.h (struct eh_frame_array_ent): Add "range".
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Stash address
range of FDEs to hdr_info->array.
(_bfd_elf_write_section_eh_frame_hdr): Report overflow in
.eh_frame_hdr entries, and overlapping FDEs.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 2f24274..dc343ec 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -372,6 +372,7 @@ struct eh_frame_sec_info struct eh_frame_array_ent { bfd_vma initial_loc; + bfd_size_type range; bfd_vma fde; }; |