2005-04-01 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Sat, 1 Apr 2006 22:39:54 +0000 (22:39 +0000)
committerPaul Brook <paul@codesourcery.com>
Sat, 1 Apr 2006 22:39:54 +0000 (22:39 +0000)
* config/tc-arm.c (arm_fix_adjustable): Return 0 for function symbols.

ChangeLog.csl
gas/config/tc-arm.c

index b139379..75d7adb 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-01  Paul Brook  <paul@codesourcery.com>
+
+       * config/tc-arm.c (arm_fix_adjustable): Return 0 for function symbols.
+
 2006-03-30  Mark Mitchell <mark@codesourcery.com>
 
        * libiberty/configure.ac: Add cygpath for mingw hosts.
index 5af2cd4..05158ee 100644 (file)
@@ -12614,9 +12614,9 @@ arm_fix_adjustable (fixS * fixP)
 #endif
 
 #ifdef OBJ_ELF
-/* Relocations against Thumb function names must be left unadjusted,
-   so that the linker can use this information to correctly set the
-   bottom bit of their addresses.  The MIPS version of this function
+/* Relocations against function names must be left unadjusted,
+   so that the linker can use this information to generate interworking
+   stubs.  The MIPS version of this function
    also prevents relocations that are mips-16 specific, but I do not
    know why it does this.
 
@@ -12633,6 +12633,10 @@ arm_fix_adjustable (fixS * fixP)
   if (fixP->fx_addsy == NULL)
     return 1;
 
+  /* Preserve relocations against symbols with function type.  */
+  if (symbol_get_bfdsym (fixP->fx_addsy)->flags & BSF_FUNCTION)
+    return 0;
+
   if (THUMB_IS_FUNC (fixP->fx_addsy)
       && fixP->fx_subsy == NULL)
     return 0;