aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-08-11 11:31:01 +0000
committerAlan Modra <amodra@gmail.com>2003-08-11 11:31:01 +0000
commit6ab189d5a4e597beffd8ca1d6f3e023f43425961 (patch)
tree78b9f4f975904de60bf71167568c21463d973dca /bfd/elf64-ppc.c
parentfb52b2f459b98125ab0cff0e16b421418541a8e1 (diff)
downloadgdb-6ab189d5a4e597beffd8ca1d6f3e023f43425961.zip
gdb-6ab189d5a4e597beffd8ca1d6f3e023f43425961.tar.gz
gdb-6ab189d5a4e597beffd8ca1d6f3e023f43425961.tar.bz2
* elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
branch to __libc_start_main.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 3916333..966dc43 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7788,6 +7788,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if ((insn & 1) == 0)
can_plt_call = 1;
}
+ else if (h != NULL
+ && strcmp (h->root.root.string,
+ ".__libc_start_main") == 0)
+ {
+ /* Allow crt1 branch to go via a toc adjusting stub. */
+ can_plt_call = 1;
+ }
else
{
if (strcmp (input_section->output_section->name,