summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/elf-eh-frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/bfd/elf-eh-frame.c')
-rw-r--r--contrib/binutils/bfd/elf-eh-frame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/binutils/bfd/elf-eh-frame.c b/contrib/binutils/bfd/elf-eh-frame.c
index 6a23edb..713dc8f 100644
--- a/contrib/binutils/bfd/elf-eh-frame.c
+++ b/contrib/binutils/bfd/elf-eh-frame.c
@@ -627,11 +627,11 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
goto free_no_table;
if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
{
- cookie->rel = rel;
/* This is a FDE against discarded section, it should
be deleted. */
new_size -= hdr.length + 4;
sec_info->entry[sec_info->count].removed = 1;
+ memset (rel, 0, sizeof (*rel));
}
else
{
@@ -787,7 +787,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
struct eh_frame_hdr_info *hdr_info;
sec = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr");
- if (sec == NULL)
+ if (sec == NULL || bfd_is_abs_section (sec->output_section))
return true;
hdr_info
@@ -805,7 +805,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
/* Count only sections which have at least a single CIE or FDE.
There cannot be any CIE or FDE <= 8 bytes. */
o = bfd_get_section_by_name (abfd, ".eh_frame");
- if (o && o->_raw_size > 8)
+ if (o && o->_raw_size > 8 && !bfd_is_abs_section (o->output_section))
break;
}
OpenPOWER on IntegriCloud