[PATCH] Handle .toc1 in ppc64_elf_action_discarded
Jakub Jelinek
jakub@redhat.com
Fri Dec 30 13:11:00 GMT 2005
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 <jakub@redhat.com>
* 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
More information about the Binutils
mailing list