| 24 |
#include "bfd.h" |
#include "bfd.h" |
| 25 |
#include "libbfd.h" |
#include "libbfd.h" |
| 26 |
#include "elf-bfd.h" |
#include "elf-bfd.h" |
| 27 |
#include "elf/dwarf2.h" |
#include "dwarf2.h" |
| 28 |
|
|
| 29 |
#define EH_FRAME_HDR_SIZE 8 |
#define EH_FRAME_HDR_SIZE 8 |
| 30 |
|
|
| 549 |
< (bfd_size_type) ((buf) - ehbuf))) \ |
< (bfd_size_type) ((buf) - ehbuf))) \ |
| 550 |
cookie->rel++ |
cookie->rel++ |
| 551 |
|
|
|
#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++; \ |
|
|
} |
|
|
|
|
| 552 |
#define GET_RELOC(buf) \ |
#define GET_RELOC(buf) \ |
| 553 |
((cookie->rel < cookie->relend \ |
((cookie->rel < cookie->relend \ |
| 554 |
&& (cookie->rel->r_offset \ |
&& (cookie->rel->r_offset \ |
| 807 |
|
|
| 808 |
buf = last_fde + 4 + hdr_length; |
buf = last_fde + 4 + hdr_length; |
| 809 |
|
|
| 810 |
/* Cleared FDE? The instructions will not be cleared but verify all |
/* For NULL RSEC (cleared FDE belonging to a discarded section) |
| 811 |
the relocation entries for them are cleared. */ |
the relocations are commonly cleared. We do not sanity check if |
| 812 |
if (rsec == NULL) |
all these relocations are cleared as (1) relocations to |
| 813 |
{ |
.gcc_except_table will remain uncleared (they will get dropped |
| 814 |
REQUIRE_CLEARED_RELOCS (buf); |
with the drop of this unused FDE) and (2) BFD already safely drops |
| 815 |
} |
relocations of any type to .eh_frame by |
| 816 |
else |
elf_section_ignore_discarded_relocs. |
| 817 |
{ |
TODO: The .gcc_except_table entries should be also filtered as |
| 818 |
SKIP_RELOCS (buf); |
.eh_frame entries; or GCC could rather use COMDAT for them. */ |
| 819 |
} |
SKIP_RELOCS (buf); |
| 820 |
} |
} |
| 821 |
|
|
| 822 |
/* Try to interpret the CFA instructions and find the first |
/* Try to interpret the CFA instructions and find the first |