* elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
	* linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
	* bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
	* bfd-in2.h: Regenerate.
ld/
	* ldemul.c (ldemul_finish): Call ld_emulation->finish unconditionally.
	(finish_default): New function.
	* ldemul.h (finish_default): Declare.
	* emultempl/aix.em (gld*_before_allocation): Call
	before_allocation_default rather than strip_excluded_output_sections.
	(ld_*_emulation): Init finish field to finish_default.
	* emultempl/armcoff.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/generic.em: Likewise.
	* emultempl/gld960.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/hppaelf.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/lnk960.em: Likewise.
	* emultempl/m68kcoff.em: Likewise.
	* emultempl/mmo.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/sunos.em: Likewise.
	* emultempl/ticoff.em: Likewise.
	* emultempl/vanilla.em: Likewise.
This commit is contained in:
Alan Modra 2005-08-04 01:19:10 +00:00
parent 90b263f311
commit 1e035701d6
25 changed files with 104 additions and 64 deletions

View file

@ -9890,39 +9890,6 @@ _bfd_elf_provide_section_bound_symbols (struct bfd_link_info *info,
_bfd_elf_provide_symbol (info, end, val, sec);
}
/* Convert symbols in excluded output sections to absolute. */
static bfd_boolean
fix_syms (struct bfd_link_hash_entry *h, void *data)
{
bfd *obfd = (bfd *) data;
if (h->type == bfd_link_hash_warning)
h = h->u.i.link;
if (h->type == bfd_link_hash_defined
|| h->type == bfd_link_hash_defweak)
{
asection *s = h->u.def.section;
if (s != NULL
&& s->output_section != NULL
&& (s->output_section->flags & SEC_EXCLUDE) != 0
&& bfd_section_removed_from_list (obfd, s->output_section))
{
h->u.def.value += s->output_offset + s->output_section->vma;
h->u.def.section = bfd_abs_section_ptr;
}
}
return TRUE;
}
void
_bfd_elf_fix_excluded_sec_syms (bfd *obfd, struct bfd_link_info *info)
{
bfd_link_hash_traverse (info->hash, fix_syms, obfd);
}
bfd_boolean
_bfd_elf_common_definition (Elf_Internal_Sym *sym)
{