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]

Blackfin patch: Don't define _gp symbol


This fixes an oversight - unlike the FRV where this code was taken from, we don't need a _gp symbol on the Blackfin. Since Blackfin symbols start with an underscore, this was polluting the namespace.

Committed.


Bernd
Index: ChangeLog.bfin
===================================================================
RCS file: /cvsroot/gcc3/binutils/binutils-2.15/bfd/ChangeLog.bfin,v
retrieving revision 1.32
diff -d -u -p -r1.32 ChangeLog.bfin
--- ChangeLog.bfin	25 Mar 2006 02:54:00 -0000	1.32
+++ ChangeLog.bfin	5 Apr 2006 19:42:33 -0000
@@ -1,3 +1,8 @@
+2006-04-05  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+	* elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
+	symbol.
+
 2006-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
 
 	* elf32-bfin.c (struct bfinfdpic_relocs_info): Lose the "los"
Index: elf32-bfin.c
===================================================================
RCS file: /cvsroot/gcc3/binutils/binutils-2.15/bfd/elf32-bfin.c,v
retrieving revision 1.33
diff -d -u -p -r1.33 elf32-bfin.c
--- elf32-bfin.c	25 Mar 2006 02:54:00 -0000	1.33
+++ elf32-bfin.c	5 Apr 2006 19:42:35 -0000
@@ -3393,22 +3393,6 @@ _bfin_create_got_section (bfd *abfd, str
       flags = BSF_GLOBAL | BSF_WEAK;
     }
 
-  /* Define _gp in .rofixup, for FDPIC, or .got otherwise.  If it
-     turns out that we're linking with a different linker script, the
-     linker script will override it.  */
-  bh = NULL;
-  if (!(_bfd_generic_link_add_one_symbol
-	(info, abfd, "_gp", flags, s, offset, (const char *) NULL, FALSE,
-	 bed->collect, &bh)))
-    return FALSE;
-  h = (struct elf_link_hash_entry *) bh;
-  h->def_regular = 1;
-  h->type = STT_OBJECT;
-
-  /* Machine-specific: we want the symbol for executables as well.  */
-  if (IS_FDPIC (abfd) && ! bfd_elf_link_record_dynamic_symbol (info, h))
-    return FALSE;
-
   return TRUE;
 }
 

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