]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-alpha.c (alpha_validate_fix): Move code ...
authorRichard Henderson <rth@redhat.com>
Thu, 7 Nov 2002 00:44:23 +0000 (00:44 +0000)
committerRichard Henderson <rth@redhat.com>
Thu, 7 Nov 2002 00:44:23 +0000 (00:44 +0000)
        (alpha_fix_adjustable): ... here.
        * config/tc-alpha.h (TC_VALIDATE_FIX): Remove.

gas/ChangeLog
gas/config/tc-alpha.c
gas/config/tc-alpha.h

index 6269078cb47053894c52fd5bcd7b09352c055116..2416a3f7368f3fa00d9ab2cc64abdc050c7dc477 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-06  Richard Henderson  <rth@redhat.com>
+
+        * config/tc-alpha.c (alpha_validate_fix): Move code ...
+        (alpha_fix_adjustable): ... here.
+        * config/tc-alpha.h (TC_VALIDATE_FIX): Remove.
+
 2002-11-05  H.J. Lu <hjl@gnu.org>
 
        * config/tc-mips.c (support_64bit_objects): Check *l before it
index 8940256a5ff9d67e02ffd3bf130fe48d5bf5118c..ae43b02e4420ee8b8f4af89a0edb20aee34abf80 100644 (file)
@@ -1412,49 +1412,6 @@ alpha_define_label (sym)
   alpha_insn_label = sym;
 }
 
-/* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
-   let it get resolved at assembly time.  */
-
-void
-alpha_validate_fix (f)
-     fixS *f;
-{
-#ifdef OBJ_ELF
-  int offset = 0;
-  const char *name;
-
-  if (f->fx_r_type != BFD_RELOC_ALPHA_BRSGP)
-    return;
-
-  if (! S_IS_DEFINED (f->fx_addsy))
-    return;
-
-  switch (S_GET_OTHER (f->fx_addsy) & STO_ALPHA_STD_GPLOAD)
-    {
-    case STO_ALPHA_NOPV:
-      break;
-    case STO_ALPHA_STD_GPLOAD:
-      offset = 8;
-      break;
-    default:
-      if (S_IS_LOCAL (f->fx_addsy))
-       name = "<local>";
-      else
-       name = S_GET_NAME (f->fx_addsy);
-      as_bad_where (f->fx_file, f->fx_line,
-                   _("!samegp reloc against symbol without .prologue: %s"),
-                   name);
-      break;
-    }
-
-  if (! (S_IS_EXTERN (f->fx_addsy) || S_IS_WEAK (f->fx_addsy)))
-    {
-      f->fx_r_type = BFD_RELOC_23_PCREL_S2;
-      f->fx_offset += offset;
-    }
-#endif
-}
-
 /* Return true if we must always emit a reloc for a type and false if
    there is some hope of resolving it at assembly time.  */
 
@@ -1524,7 +1481,6 @@ alpha_fix_adjustable (f)
     case BFD_RELOC_ALPHA_GPDISP_HI16:
     case BFD_RELOC_ALPHA_GPDISP_LO16:
     case BFD_RELOC_ALPHA_GPDISP:
-    case BFD_RELOC_ALPHA_BRSGP:
       return 0;
 
     case BFD_RELOC_ALPHA_LITERAL:
@@ -1562,6 +1518,39 @@ alpha_fix_adjustable (f)
         we're preventing this in the other assemblers.  Follow for now.  */
       return 0;
 
+    case BFD_RELOC_ALPHA_BRSGP:
+      /* If we have a BRSGP reloc to a local symbol, adjust it to BRADDR and
+         let it get resolved at assembly time.  */
+      {
+       symbolS *sym = f->fx_addsy;
+       const char *name;
+       int offset = 0;
+
+       if (! S_IS_DEFINED (sym))
+         return 0;
+
+       switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
+         {
+         case STO_ALPHA_NOPV:
+           break;
+         case STO_ALPHA_STD_GPLOAD:
+           offset = 8;
+           break;
+         default:
+           if (S_IS_LOCAL (sym))
+             name = "<local>";
+           else
+             name = S_GET_NAME (sym);
+           as_bad_where (f->fx_file, f->fx_line,
+               _("!samegp reloc against symbol without .prologue: %s"),
+               name);
+           break;
+         }
+       f->fx_r_type = BFD_RELOC_23_PCREL_S2;
+       f->fx_offset += offset;
+       return 1;
+      }
+
     default:
       return 1;
     }
index 4918b204325d764f68a31c5a6e9cfd99c9b062a1..12146b7339aebb9529c1fb0b5fcf6374e4cc9fd3 100644 (file)
 #define NEED_LITERAL_POOL
 #define REPEAT_CONS_EXPRESSIONS
 
-extern void alpha_validate_fix PARAMS ((struct fix *));
 extern int alpha_force_relocation PARAMS ((struct fix *));
 extern int alpha_fix_adjustable PARAMS ((struct fix *));
 
 extern unsigned long alpha_gprmask, alpha_fprmask;
 extern valueT alpha_gp_value;
 
-#define TC_VALIDATE_FIX(FIXP,SEGTYPE,SKIP) alpha_validate_fix (FIXP)
 #define TC_FORCE_RELOCATION(FIXP)      alpha_force_relocation (FIXP)
 #define tc_fix_adjustable(FIXP)                alpha_fix_adjustable (FIXP)
 #define RELOC_REQUIRES_SYMBOL