svn commit: r202955 - projects/ppc64/contrib/binutils/bfd

Nathan Whitehorn nwhitehorn at FreeBSD.org
Mon Jan 25 01:33:12 UTC 2010


Author: nwhitehorn
Date: Mon Jan 25 01:33:11 2010
New Revision: 202955
URL: http://svn.freebsd.org/changeset/base/202955

Log:
  Check if the GOT exists before trying to make a new one. This makes ld
  reliably link powerpc64 shared objects, like libc.so.

Modified:
  projects/ppc64/contrib/binutils/bfd/elf64-ppc.c

Modified: projects/ppc64/contrib/binutils/bfd/elf64-ppc.c
==============================================================================
--- projects/ppc64/contrib/binutils/bfd/elf64-ppc.c	Mon Jan 25 00:44:05 2010	(r202954)
+++ projects/ppc64/contrib/binutils/bfd/elf64-ppc.c	Mon Jan 25 01:33:11 2010	(r202955)
@@ -3268,7 +3268,9 @@ create_got_section (bfd *abfd, struct bf
   flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
 	   | SEC_LINKER_CREATED);
 
-  got = bfd_make_section (abfd, ".got");
+  got = bfd_get_section_by_name(abfd, ".got");
+  if (!got)
+	got = bfd_make_section (abfd, ".got");
   if (!got
       || !bfd_set_section_flags (abfd, got, flags)
       || !bfd_set_section_alignment (abfd, got, 3))


More information about the svn-src-projects mailing list