* elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
authorAlan Modra <amodra@gmail.com>
Mon, 11 Aug 2003 11:31:01 +0000 (11:31 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 11 Aug 2003 11:31:01 +0000 (11:31 +0000)
branch to __libc_start_main.

bfd/ChangeLog
bfd/elf64-ppc.c

index f3070c79763f914440111e05f512fd9a6b70138c..0709dc3ec5617c740a79d16083b5497c7a812a1b 100644 (file)
@@ -1,6 +1,12 @@
+2003-08-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
+       branch to __libc_start_main.
+
 2003-08-08 Dmitry Diky <diwil@mail.ru>
 
-       * 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.
index 391633378d032234b7f4a092a17180e939bc8d00..966dc431cdeababb5c5ef96d103e497affdf3310 100644 (file)
@@ -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,