From: Alan Modra Date: Mon, 11 Aug 2003 11:31:01 +0000 (+0000) Subject: * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o X-Git-Tag: ezannoni_pie-20030916-branchpoint~414 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ab189d5a4e597beffd8ca1d6f3e023f43425961;p=external%2Fbinutils.git * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o branch to __libc_start_main. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f3070c7..0709dc3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,12 @@ +2003-08-11 Alan Modra + + * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o + branch to __libc_start_main. + 2003-08-08 Dmitry Diky - * archures.c: Add xW42 and xE42 parts. Sort MPU list according to gcc order. + * archures.c: Add xW42 and xE42 parts. Sort MPU list according to + gcc order. * cpu-msp430.c: Likewise. * elf32-msp430.c: Likewise. * bfd-in2.h: Regenerate. 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,