* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a

non-shared object, do not reserve space in .plt and .rela.plt
	for regular symbols neither defined nor referenced in shared objects.
This commit is contained in:
Eric Botcazou 2005-01-10 11:23:01 +00:00
parent 0bcb06d2f2
commit 669460c7e6
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt for
regular symbols neither defined nor referenced in shared objects.
2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc

View File

@ -1680,7 +1680,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags & SEC_CODE) != 0))
{
if (! elf_hash_table (info)->dynamic_sections_created)
if (! info->shared
&& !h->def_dynamic
&& !h->ref_dynamic
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_undefined)
{
/* This case can occur if we saw a WPLT30 reloc in an input
file, but none of the input files were dynamic objects.