summaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-08-03 05:10:39 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-08-03 05:10:39 +0000
commita13b2824f721df0f59fa7a496af57ed1b7576534 (patch)
treed4789cf3d70666c0edc6eb2de7a0cd932b6d9541 /bfd/elf32-hppa.c
parentd935aa7d4ddfa9e328ffa1d344dfaef737434b55 (diff)
downloadgdb-a13b2824f721df0f59fa7a496af57ed1b7576534.tar.gz
* 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 af08d8e010f..7fe328e7039 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. */