diff options
author | Alan Modra <amodra@gmail.com> | 2006-03-15 14:30:19 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-03-15 14:30:19 +0000 |
commit | 7123df0e8094827978ce5f0cebc67e5d58bdc053 (patch) | |
tree | 9ee0c63077800e0b1fcf5d4123511b2e5496608d | |
parent | fd38b44ca18f24f97c00d5e263a653a98de0924d (diff) | |
download | gdb-7123df0e8094827978ce5f0cebc67e5d58bdc053.zip gdb-7123df0e8094827978ce5f0cebc67e5d58bdc053.tar.gz gdb-7123df0e8094827978ce5f0cebc67e5d58bdc053.tar.bz2 |
* elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
last change to REL32 relocs so that they are counted as
possibly dynamic as per REL24 and REL14.
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 10 |
2 files changed, 13 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ed9aa27..5c8f5c0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ 2006-03-16 Alan Modra <amodra@bigpond.net.au> + * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs + against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak + last change to REL32 relocs so that they are counted as + possibly dynamic as per REL24 and REL14. + +2006-03-16 Alan Modra <amodra@bigpond.net.au> + * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24 checks from REL32. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 7d1cb79..3d9402e 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -3335,9 +3335,9 @@ ppc_elf_check_relocs (bfd *abfd, if (s == got2) htab->plt_type = PLT_OLD; } - if (h == NULL) + if (h == NULL || h == htab->elf.hgot) break; - goto dodyn; + goto dodyn1; case R_PPC_REL24: case R_PPC_REL14: @@ -3345,9 +3345,10 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_REL14_BRNTAKEN: if (h == NULL) break; - if (h == htab->elf.hgot && htab->plt_type == PLT_UNSET) + if (h == htab->elf.hgot) { - htab->plt_type = PLT_OLD; + if (htab->plt_type == PLT_UNSET) + htab->plt_type = PLT_OLD; break; } /* fall through */ @@ -3363,6 +3364,7 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_ADDR14_BRNTAKEN: case R_PPC_UADDR32: case R_PPC_UADDR16: + dodyn1: if (h != NULL && !info->shared) { /* We may need a plt entry if the symbol turns out to be |