-static -pie.
On sparc64, avoid generating GLOB_DAT relocs and convert certain absolute
relocs into RELATIVE relocs when we can for -static -pie.
With this change we don't need -Wl,-Bsymbolic anymore when building -static
-pie binaries.
ok millert@, kurt@
/* h->dynindx may be -1 if the symbol was marked to
become local. */
else if (h != NULL && ! is_plt
- && ((! info->symbolic && h->dynindx != -1)
+ && ((!info->symbolic && !info->static_link
+ && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
{
The entry in the global offset table will already have been
initialized in the relocate_section function. */
if (info->shared
- && (info->symbolic || h->dynindx == -1)
+ && (info->symbolic || info->static_link || h->dynindx == -1)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
{
asection *sec = h->root.u.def.section;
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
&& eif->info->shared
&& is_elf_hash_table (eif->info->hash)
- && (eif->info->symbolic
+ && (eif->info->symbolic || eif->info->static_link
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{