gas/
[deliverable/binutils-gdb.git] / gas / config / tc-alpha.c
index 9fb53bffe5128dab1fb3922f072807a568d61ff8..fd1a0d8a587647c935958031246b8ba0ac5c2af9 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
    Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Carnegie Mellon University, 1993.
    Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
    Modified by Ken Raeburn for gas-2.x and ECOFF support.
@@ -1261,6 +1261,8 @@ md_apply_fix3 (fixP, valP, seg)
 
 #ifdef OBJ_ELF
     case BFD_RELOC_ALPHA_BRSGP:
+      return;
+
     case BFD_RELOC_ALPHA_TLSGD:
     case BFD_RELOC_ALPHA_TLSLDM:
     case BFD_RELOC_ALPHA_GOTDTPREL16:
@@ -1271,6 +1273,8 @@ md_apply_fix3 (fixP, valP, seg)
     case BFD_RELOC_ALPHA_TPREL_HI16:
     case BFD_RELOC_ALPHA_TPREL_LO16:
     case BFD_RELOC_ALPHA_TPREL16:
+      if (fixP->fx_addsy)
+       S_SET_THREAD_LOCAL (fixP->fx_addsy);
       return;
 #endif
 
@@ -1444,8 +1448,6 @@ alpha_force_relocation (f)
     case BFD_RELOC_ALPHA_LINKAGE:
     case BFD_RELOC_ALPHA_CODEADDR:
     case BFD_RELOC_ALPHA_BRSGP:
-    case BFD_RELOC_VTABLE_INHERIT:
-    case BFD_RELOC_VTABLE_ENTRY:
     case BFD_RELOC_ALPHA_TLSGD:
     case BFD_RELOC_ALPHA_TLSLDM:
     case BFD_RELOC_ALPHA_GOTDTPREL16:
@@ -1462,7 +1464,7 @@ alpha_force_relocation (f)
       break;
     }
 
-  return S_FORCE_RELOC (f->fx_addsy);
+  return generic_force_reloc (f);
 }
 
 /* Return true if we can partially resolve a relocation now.  */
@@ -1515,6 +1517,7 @@ alpha_fix_adjustable (f)
         we're preventing this in the other assemblers.  Follow for now.  */
       return 0;
 
+#ifdef OBJ_ELF
     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.  */
@@ -1523,7 +1526,7 @@ alpha_fix_adjustable (f)
        const char *name;
        int offset = 0;
 
-       if (! S_IS_DEFINED (sym) || S_FORCE_RELOC (sym))
+       if (generic_force_reloc (f))
          return 0;
 
        switch (S_GET_OTHER (sym) & STO_ALPHA_STD_GPLOAD)
@@ -1547,6 +1550,7 @@ alpha_fix_adjustable (f)
        f->fx_offset += offset;
        return 1;
       }
+#endif
 
     default:
       return 1;
@@ -5062,8 +5066,6 @@ s_alpha_file (ignore)
   int length;
   static char case_hack[32];
 
-  extern char *demand_copy_string PARAMS ((int *lenP));
-
   sprintf (case_hack, "<CASE:%01d%01d>",
           alpha_flag_hash_long_names, alpha_flag_show_after_trunc);
 
@@ -5633,7 +5635,7 @@ alpha_elf_section_letter (letter, ptr_msg)
     return SHF_ALPHA_GPREL;
 
   *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S,G,T in string");
-  return 0;
+  return -1;
 }
 
 /* Map SHF_ALPHA_GPREL to SEC_SMALL_DATA.  */
This page took 0.024354 seconds and 4 git commands to generate.