aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-08-03 05:10:39 +0000
committerAlan Modra <amodra@gmail.com>2001-08-03 05:10:39 +0000
commit8e1d4bbbc0d40e33df07d13080aa984902bf4ef2 (patch)
tree6f136386eac70d2342f990bd71e4434416831a2c /bfd/elf32-hppa.c
parentb6bf44ba1b497f5cf654851f6c360313b05345f4 (diff)
downloadfsf-binutils-gdb-8e1d4bbbc0d40e33df07d13080aa984902bf4ef2.zip
fsf-binutils-gdb-8e1d4bbbc0d40e33df07d13080aa984902bf4ef2.tar.gz
fsf-binutils-gdb-8e1d4bbbc0d40e33df07d13080aa984902bf4ef2.tar.bz2
* elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
keep relocs for undefined syms if there are no dynamic sections in executable. * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index af08d8e..7fe328e 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -2141,8 +2141,9 @@ allocate_plt_and_got_and_discard_relocs (h, inf)
if (!info->shared
&& (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
- || h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_undefined))
+ || (hplink->root.dynamic_sections_created
+ && (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined))))
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */