mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
* elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
to output forced local syms for non-shared link. (elf_link_output_extsym): Tweak condition for calling backend adjust_dynamic_symbol so that previous behaviour is kept.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2002-03-05 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
|
||||||
|
to output forced local syms for non-shared link.
|
||||||
|
(elf_link_output_extsym): Tweak condition for calling backend
|
||||||
|
adjust_dynamic_symbol so that previous behaviour is kept.
|
||||||
|
Whitespace changes throughout file.
|
||||||
|
|
||||||
2002-03-04 H.J. Lu <hjl@gnu.org>
|
2002-03-04 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* elf.c (bfd_section_from_shdr): Handle special sections,
|
* elf.c (bfd_section_from_shdr): Handle special sections,
|
||||||
|
@ -4983,8 +4983,8 @@ elf_bfd_final_link (abfd, info)
|
|||||||
(abfd, sec, (PTR) NULL,
|
(abfd, sec, (PTR) NULL,
|
||||||
(Elf_Internal_Rela *) NULL, info->keep_memory));
|
(Elf_Internal_Rela *) NULL, info->keep_memory));
|
||||||
|
|
||||||
o->reloc_count += (*bed->elf_backend_count_relocs)
|
o->reloc_count
|
||||||
(sec, relocs);
|
+= (*bed->elf_backend_count_relocs) (sec, relocs);
|
||||||
|
|
||||||
if (!info->keep_memory)
|
if (!info->keep_memory)
|
||||||
free (relocs);
|
free (relocs);
|
||||||
@ -5345,19 +5345,12 @@ elf_bfd_final_link (abfd, info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* That wrote out all the local symbols. Finish up the symbol table
|
|
||||||
with the global symbols. Even if we want to strip everything we
|
|
||||||
can, we still need to deal with those global symbols that got
|
|
||||||
converted to local in a version script. */
|
|
||||||
|
|
||||||
if (info->shared)
|
|
||||||
{
|
|
||||||
/* Output any global symbols that got converted to local in a
|
/* Output any global symbols that got converted to local in a
|
||||||
version script. We do this in a separate step since ELF
|
version script or due to symbol visibility. We do this in a
|
||||||
requires all local symbols to appear prior to any global
|
separate step since ELF requires all local symbols to appear
|
||||||
symbols. FIXME: We should only do this if some global
|
prior to any global symbols. FIXME: We should only do this if
|
||||||
symbols were, in fact, converted to become local. FIXME:
|
some global symbols were, in fact, converted to become local.
|
||||||
Will this work correctly with the Irix 5 linker? */
|
FIXME: Will this work correctly with the Irix 5 linker? */
|
||||||
eoinfo.failed = false;
|
eoinfo.failed = false;
|
||||||
eoinfo.finfo = &finfo;
|
eoinfo.finfo = &finfo;
|
||||||
eoinfo.localsyms = true;
|
eoinfo.localsyms = true;
|
||||||
@ -5365,7 +5358,11 @@ elf_bfd_final_link (abfd, info)
|
|||||||
(PTR) &eoinfo);
|
(PTR) &eoinfo);
|
||||||
if (eoinfo.failed)
|
if (eoinfo.failed)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
/* That wrote out all the local symbols. Finish up the symbol table
|
||||||
|
with the global symbols. Even if we want to strip everything we
|
||||||
|
can, we still need to deal with those global symbols that got
|
||||||
|
converted to local in a version script. */
|
||||||
|
|
||||||
/* The sh_info field records the index of the first non local symbol. */
|
/* The sh_info field records the index of the first non local symbol. */
|
||||||
symtab_hdr->sh_info = bfd_get_symcount (abfd);
|
symtab_hdr->sh_info = bfd_get_symcount (abfd);
|
||||||
@ -6105,9 +6102,12 @@ elf_link_output_extsym (h, data)
|
|||||||
|
|
||||||
/* Give the processor backend a chance to tweak the symbol value,
|
/* Give the processor backend a chance to tweak the symbol value,
|
||||||
and also to finish up anything that needs to be done for this
|
and also to finish up anything that needs to be done for this
|
||||||
symbol. */
|
symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for
|
||||||
|
forced local syms when non-shared is due to a historical quirk. */
|
||||||
if ((h->dynindx != -1
|
if ((h->dynindx != -1
|
||||||
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
|
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
|
||||||
|
&& (finfo->info->shared
|
||||||
|
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
|
||||||
&& elf_hash_table (finfo->info)->dynamic_sections_created)
|
&& elf_hash_table (finfo->info)->dynamic_sections_created)
|
||||||
{
|
{
|
||||||
struct elf_backend_data *bed;
|
struct elf_backend_data *bed;
|
||||||
|
Reference in New Issue
Block a user