Incompatibility of PIC and non-PIC
David Huggins-Daines
dhd@linuxcare.com
19 Aug 2000 18:00:21 -0400
David Huggins-Daines <dhd@linuxcare.com> writes:
> @@ -1961,8 +1961,8 @@
> || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
> {
> if (h->plt.refcount <= 0
> + || h->root.type == bfd_link_hash_undefweak
> || ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
> - && h->root.type != bfd_link_hash_defweak
> && (!info->shared || info->symbolic)
> && !(!info->shared
> && (h->root.type == bfd_link_hash_defined
This chunk needs to also check for undefined symbols, it seems.
Here's a better one:
@@ -1961,8 +1961,9 @@
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
if (h->plt.refcount <= 0
+ || h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && h->root.type != bfd_link_hash_defweak
&& (!info->shared || info->symbolic)
&& !(!info->shared
&& (h->root.type == bfd_link_hash_defined
--
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.