aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-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/elf64-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/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 3ee3f69..86fe3c3 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7891,7 +7891,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
Undefined weak syms won't yet be marked as dynamic,
nor will all TLS symbols. */
if (h->dynindx == -1
- && !h->forced_local)
+ && !h->forced_local
+ && htab->elf.dynamic_sections_created)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -7925,7 +7926,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
else
gent->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
@@ -7982,7 +7984,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
dynamic. */
if (!h->non_got_ref
- && h->def_dynamic
&& !h->def_regular)
{
/* Make sure this symbol is output as a dynamic symbol.
@@ -11251,7 +11252,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
&& h != NULL
&& h->elf.dynindx != -1
&& !h->elf.non_got_ref
- && h->elf.def_dynamic
&& !h->elf.def_regular))
{
Elf_Internal_Rela outrel;