This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Handle .toc1 in ppc64_elf_action_discarded


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]