-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@
if (h->needs_plt
&& 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->def_regular)
{
/* 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->def_regular))
{
BFD_ASSERT (h->dynindx != -1);
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->def_regular)
{
asection *sec = h->root.u.def.section;