aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-08-12 13:12:49 +0000
committerAlan Modra <amodra@gmail.com>2008-08-12 13:12:49 +0000
commitb099ab9fcd00257ccf077d30a327a719edd940e6 (patch)
tree9e05399d1c8926999a369f766173cbe3df2e826e /bfd/elf32-ppc.c
parentdb0bc2846c03b3b1a281d424299fec1dc9a9c706 (diff)
downloadgdb-b099ab9fcd00257ccf077d30a327a719edd940e6.zip
gdb-b099ab9fcd00257ccf077d30a327a719edd940e6.tar.gz
gdb-b099ab9fcd00257ccf077d30a327a719edd940e6.tar.bz2
* elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
!dynamic_sections_created. Don't make symbols with got references dynamic if !dynamic_sections_created. * elf64-ppc.c (allocate_dynrelocs): Likewise. Alloc dynamic relocs on undefined symbols. (ppc64_elf_relocate_section): Allow dynamic relocs on undefined symbols.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index a93a706..84e72b8 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -4993,7 +4993,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
/* Make sure this symbol is output as a dynamic symbol. */
if (eh->elf.dynindx == -1
- && !eh->elf.forced_local)
+ && !eh->elf.forced_local
+ && htab->elf.dynamic_sections_created)
{
if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf))
return FALSE;
@@ -5041,7 +5042,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else
eh->elf.got.offset = (bfd_vma) -1;
- if (eh->dyn_relocs == NULL)
+ if (eh->dyn_relocs == NULL
+ || !htab->elf.dynamic_sections_created)
return TRUE;
/* In the shared -Bsymbolic case, discard space allocated for