[PATCH] Handle .toc1 in ppc64_elf_action_discarded

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Handle .toc1 in ppc64_elf_action_discarded

Jakub Jelinek
Hi!

Without this patch, I'm getting:
./g++ -B ./ -m64 -O2 -fPIC -mminimal-toc -o /tmp/comdat4 ../../gcc/testsuite/g++.old-deja/g++.other/comdat4{.C,-aux.cc} -L../powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs/
/usr/bin/ld: .text._Z3fooi' referenced in section .toc1' of /tmp/ccDEKQ7m.o: defined in discarded section .text._Z3fooi[foo(int)]' of /tmp/ccDEKQ7m.o
(with various versions of GCC, e.g. 4.0.2 or trunk).

Ok to commit?

2005-12-30  Jakub Jelinek  <[hidden email]>

        * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
        for .toc1 section.

--- bfd/elf64-ppc.c.jj 2005-12-30 13:32:13.000000000 +0100
+++ bfd/elf64-ppc.c 2005-12-30 14:04:46.000000000 +0100
@@ -9494,6 +9494,9 @@ ppc64_elf_action_discarded (asection *se
   if (strcmp (".toc", sec->name) == 0)
     return 0;
 
+  if (strcmp (".toc1", sec->name) == 0)
+    return 0;
+
   return _bfd_elf_default_action_discarded (sec);
 }
 

        Jakub
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Handle .toc1 in ppc64_elf_action_discarded

Alan Modra
On Fri, Dec 30, 2005 at 02:11:55PM +0100, Jakub Jelinek wrote:
> Ok to commit?

Yes, thanks.

> 2005-12-30  Jakub Jelinek  <[hidden email]>
>
> * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
> for .toc1 section.

--
Alan Modra
IBM OzLabs - Linux Technology Centre