summaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-09-23 10:52:03 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-09-23 10:52:03 +0000
commitf0036f1c6181742c6076601bbdc8ce07d621d7df (patch)
treeae13c282e7a040b975278044bb4c4a7d03578199 /bfd/elflink.h
parentacf54a045686e60018d7e025150b706f7069e787 (diff)
downloadgdb-f0036f1c6181742c6076601bbdc8ce07d621d7df.tar.gz
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
for discarded FDEs. Remove redundant assignment. * elflink.h (elf_bfd_discard_info): Save edited relocs.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 2df334b1e48..85160e90257 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -8482,7 +8482,12 @@ elf_bfd_discard_info (output_bfd, info)
if (_bfd_elf_discard_section_eh_frame (abfd, info, eh, ehdr,
elf_reloc_symbol_deleted_p,
&cookie))
- ret = true;
+ {
+ /* Relocs have been edited. Ensure edited version is
+ used later in relocate_section. */
+ elf_section_data (eh)->relocs = cookie.rels;
+ ret = true;
+ }
if (cookie.rels && elf_section_data (eh)->relocs != cookie.rels)
free (cookie.rels);
}