forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user