aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-04-27 00:31:17 +0000
committerAlan Modra <amodra@gmail.com>2000-04-27 00:31:17 +0000
commitdd5724d5231bacd3bdb04bb8572fb9201ee5538e (patch)
tree3f9d95abc006131f7abd82d3a4fdccb4dc52a184 /bfd/elf32-ppc.c
parentb2f4b24dd7649bc0ab581a400d0f84b866cb6c1c (diff)
downloadgdb-dd5724d5231bacd3bdb04bb8572fb9201ee5538e.zip
gdb-dd5724d5231bacd3bdb04bb8572fb9201ee5538e.tar.gz
gdb-dd5724d5231bacd3bdb04bb8572fb9201ee5538e.tar.bz2
Reference count .plt and .got on x86 for garbage collection code. Fix a
couple of m68k and ppc bugs discovered while testing x86 gc.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index db5b268..0ec909a 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2540,7 +2540,7 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
if (h->got.refcount > 0)
h->got.refcount--;
}
- else
+ else if (local_got_refcounts != NULL)
{
if (local_got_refcounts[r_symndx] > 0)
local_got_refcounts[r_symndx]--;
@@ -3022,6 +3022,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sec = h->root.u.def.section;
if ((r_type == R_PPC_PLT32
+ && splt != NULL
&& h->plt.offset != (bfd_vma) -1)
|| (r_type == R_PPC_LOCAL24PC
&& sec->output_section == NULL)