This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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,rs6000] don't define __eabi_convert or __eabi_uconvert if not _RELOCATABLE


EABI PowerPC includes startup routines that take care of relocting any
necessary pointers in the .fixup section.  However, these routines are
only called if -mreloctable was used when the assembly file in question
was compiled.  If the file was compiled without -mrelocatable, then the
routines are just taking up unnecessary space.

The patch below eliminates the routines unless the file is compiled with
-mrelocatable.  Tested with cross to powerpc-none-eabispe; OK to commit?

-Nathan

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 148221)
+++ gcc/ChangeLog	(working copy)
@@ -1,5 +1,11 @@
 2009-06-05  Nathan Froyd  <froydnj@codesourcery.com>
 
+	* config/rs6000/eabi.asm (__eabi_convert): Don't define if
+	_RELOCATABLE.
+	(__eabi_uconvert): Likewise.
+
+2009-06-05  Nathan Froyd  <froydnj@codesourcery.com>
+
 	* config/rs6000/ppc-asm.h: Protect auto-host.h inclusion and
 	CFI_* definitions with IN_GCC.
 
Index: gcc/config/rs6000/eabi.asm
===================================================================
--- gcc/config/rs6000/eabi.asm	(revision 148220)
+++ gcc/config/rs6000/eabi.asm	(working copy)
@@ -230,7 +230,7 @@ FUNC_END(__eabi)
    r11		has the address of .LCTOC1 in it.
    r12		has the value to add to each pointer
    r13 .. r31	are unchanged */
-	
+#ifdef _RELOCATABLE
 FUNC_START(__eabi_convert)
         cmplw	1,3,4				/* any pointers to convert? */
         subf	5,3,4				/* calculate number of words to convert */
@@ -285,5 +285,5 @@ FUNC_START(__eabi_uconvert)
         blr
 
 FUNC_END(__eabi_uconvert)
-
+#endif
 #endif


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