Apply patch from Philip Blundell <pb@nexus.co.uk>
authorNick Clifton <nickc@redhat.com>
Thu, 15 Jul 1999 01:33:07 +0000 (01:33 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 15 Jul 1999 01:33:07 +0000 (01:33 +0000)
  Prepend LOCAL_LABEL_PREFIX (if defined) to local symbols.
  ARM: Set F_SOFTFLOAT in the output file if -mno-fpu was given.

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

index a30a084..23feb61 100644 (file)
@@ -1,3 +1,15 @@
+1999-07-14  Philip Blundell  <pb@nexus.co.uk>
+
+       * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it
+       is defined.
+       * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF.
+
+       * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file
+       if -mno-fpu was given.
+       (tc_gen_reloc): Fix typo.  Delete bogus code related to GOTPC
+       relocs.
+       (cons_fix_new_arm): Remove misleading comments.
+
 1999-07-14  Ian Lance Taylor  <ian@zembu.com>
 
        * write.c (cvt_frag_to_fill): Use frag file and line in rs_org
index 93c6d82..7a90601 100644 (file)
@@ -5036,6 +5036,7 @@ md_begin ()
     if (support_interwork) flags |= F_INTERWORK;
     if (uses_apcs_float)   flags |= F_APCS_FLOAT;
     if (pic_code)          flags |= F_PIC;
+    if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT;
 
     bfd_set_private_flags (stdoutput, flags);
   }
@@ -5923,17 +5924,11 @@ tc_gen_reloc (section, fixp)
     case BFD_RELOC_ARM_LITERAL:
     case BFD_RELOC_ARM_HWLITERAL:
       /* If this is called then the a literal has been referenced across
-        a section boundry - possibly due to an implicit dump */
+        a section boundary - possibly due to an implicit dump */
       as_bad_where (fixp->fx_file, fixp->fx_line,
-                   _("Literal referenced across section boundry (Implicit dump?)"));
+                   _("Literal referenced across section boundary (Implicit dump?)"));
       return NULL;
 
-    case BFD_RELOC_ARM_GOTPC:
-      assert (fixp->fx_pcrel != 0);
-      code = fixp->fx_r_type;
-      code = BFD_RELOC_32_PCREL;
-      break;
-
 #ifdef OBJ_ELF
     case BFD_RELOC_ARM_GOT32:
     case BFD_RELOC_ARM_GOTOFF:
@@ -6755,24 +6750,7 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc)
 }
 
 
-/*
- * This fix_new is called by cons via TC_CONS_FIX_NEW
- *
- * We check the expression to see if it is of the form
- *  __GLOBAL_OFFSET_TABLE + ???
- * If it is then this is a PC relative reference to the GOT.
- * i.e.
- *     ldr     sl, L1
- *     add     sl, pc, sl
- * L2:
- *     ...
- * L1:
- *     .word   __GLOBAL_OFFSET_TABLE + (. - (L2 + 4))
- *
- * In this case use a reloc type BFD_RELOC_ARM_GOTPC instead of the
- * normal BFD_RELOC_{16,32,64}
- */
-
+/* This fix_new is called by cons via TC_CONS_FIX_NEW.  */
 void
 cons_fix_new_arm (frag, where, size, exp)
      fragS *       frag;
@@ -6801,13 +6779,6 @@ cons_fix_new_arm (frag, where, size, exp)
       break;
     }
   
-  /* Look for possible GOTPC reloc */
-  
-  /*
-   * Look for pic assembler and 'undef symbol + expr symbol' expression
-   * and a 32 bit size.
-   */
-  
   fix_new_exp (frag, where, (int) size, exp, pcrel, type);
 }
 
index 72a5713..d27d61d 100644 (file)
@@ -171,6 +171,9 @@ char * arm_canonicalize_symbol_name PARAMS ((char *));
 
 #define LOCAL_LABEL(name) (name[0] == '.' && (name[1] == 'L'))
 #define LOCAL_LABELS_FB   1
+#ifdef OBJ_ELF
+#define LOCAL_LABEL_PREFIX '.'
+#endif
 
 /* This expression evaluates to false if the relocation is for a local object
    for which we still want to do the relocation at runtime.  True if we