aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-01-27 18:13:01 +0000
committerIan Lance Taylor <ian@airs.com>1997-01-27 18:13:01 +0000
commit9950f925f79b168e3d212156b6e5d624c57baa68 (patch)
tree56521ad9f10828586d7ab9e7212e8c752c51c4a3 /bfd/elf32-ppc.c
parentf5f212fb563a3e8bfe8f1d86f12dd42e1f5163f7 (diff)
downloadgdb-9950f925f79b168e3d212156b6e5d624c57baa68.zip
gdb-9950f925f79b168e3d212156b6e5d624c57baa68.tar.gz
gdb-9950f925f79b168e3d212156b6e5d624c57baa68.tar.bz2
* elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
relocations against the text segment, look up the output name of the reloc section. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index e47c46c..ed12703 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -1,5 +1,5 @@
/* PowerPC-specific support for 32-bit ELF
- Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -1695,6 +1695,8 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
than .rel.plt. */
if (strcmp (name, ".rela.plt") != 0)
{
+ const char *outname;
+
relocs = true;
/* If this relocation section applies to a read only
@@ -1702,7 +1704,9 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
entry. The entries in the .rel.plt section
really apply to the .got section, which we
created ourselves and so know is not readonly. */
- target = bfd_get_section_by_name (output_bfd, name + 4);
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 4);
if (target != NULL
&& (target->flags & SEC_READONLY) != 0)
reltext = true;