+2001-02-13 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
+ $global$ referenced but not defined, set its value here.
+
2001-02-09 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
h = elf_link_hash_lookup (&hplink->root, "$global$",
false, false, false);
- if (h != NULL && h->root.type == bfd_link_hash_defined)
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak))
{
gp_val = h->root.u.def.value;
sec = h->root.u.def.section;
sec = bfd_get_section_by_name (abfd, ".data");
}
}
+
+ if (h != NULL)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.value = gp_val;
+ if (sec != NULL)
+ h->root.u.def.section = sec;
+ else
+ h->root.u.def.section = bfd_abs_section_ptr;
+ }
}
if (sec != NULL)