Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2010 01:33:11 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r202955 - projects/ppc64/contrib/binutils/bfd
Message-ID:  <201001250133.o0P1XBcl001965@svn.freebsd.org>

index | next in thread | raw e-mail

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))


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001250133.o0P1XBcl001965>