aboutsummaryrefslogtreecommitdiff
path: root/bfd/merge.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-01-15 12:52:15 +0000
committerJakub Jelinek <jakub@redhat.com>2002-01-15 12:52:15 +0000
commitd3c456e9506b08668419af641c7b14be84ec73ac (patch)
treeb952ee6248ac6bb1f2cbde9d72ef7ea589137a8c /bfd/merge.c
parent8b8c5dbda54c48219d5e6dbba8ff9ab3594689c1 (diff)
downloadgdb-d3c456e9506b08668419af641c7b14be84ec73ac.zip
gdb-d3c456e9506b08668419af641c7b14be84ec73ac.tar.gz
gdb-d3c456e9506b08668419af641c7b14be84ec73ac.tar.bz2
* elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
* elf.c (merge_sections_remove_hook): New function. (_bfd_elf_merge_sections): Pass it as 3rd argument to _bfd_merge_sections. * libbfd-in.h (_bfd_merge_sections): Add 3rd argument. * libbfd.h: Rebuilt. * merge.c (_bfd_merge_sections): Add remove_hook argument. Call remove_hook if a SEC_EXCLUDE section is encountered.
Diffstat (limited to 'bfd/merge.c')
-rw-r--r--bfd/merge.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/merge.c b/bfd/merge.c
index d3586fe..7b06c10 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -771,9 +771,10 @@ alloc_failure:
with _bfd_merge_section. */
boolean
-_bfd_merge_sections (abfd, xsinfo)
+_bfd_merge_sections (abfd, xsinfo, remove_hook)
bfd *abfd ATTRIBUTE_UNUSED;
PTR xsinfo;
+ void (*remove_hook) PARAMS((bfd *, asection *));
{
struct sec_merge_info *sinfo;
@@ -792,7 +793,11 @@ _bfd_merge_sections (abfd, xsinfo)
/* Record the sections into the hash table. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
if (secinfo->sec->flags & SEC_EXCLUDE)
- *secinfo->psecinfo = NULL;
+ {
+ *secinfo->psecinfo = NULL;
+ if (remove_hook)
+ (*remove_hook) (abfd, secinfo->sec);
+ }
else if (! record_section (sinfo, secinfo))
break;