Warn rather than cause an error if the reloc is not compatible with -mrelocatable.
authorMichael Meissner <gnu@the-meissners.org>
Tue, 14 Mar 1995 22:05:48 +0000 (22:05 +0000)
committerMichael Meissner <gnu@the-meissners.org>
Tue, 14 Mar 1995 22:05:48 +0000 (22:05 +0000)
gas/ChangeLog
gas/config/tc-ppc.c

index bb25016677b48cd5f543121685191056bcb56747..63b7cf2c0a6795e574746cd365d76ec7707af181 100644 (file)
@@ -1,3 +1,8 @@
+Tue Mar 14 17:00:57 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
+
+       * config/tc-ppc.c (ppc_elf_validate_fix): Use as_warn_where, not
+       as_bad_where to give a warning instead of an error.
+
 Mon Mar 13 17:03:46 1995  Pat Rankin  (rankin@eql.caltech.edu)
 
        * config/tc-vax.c (md_assemble):  issue a warning if a constant
index 89380262f4fbc4d6bdecb32a7d2349cd3c8099c7..f21096d4829a67f7929c8322fede63a546672cb4 100644 (file)
 
 #include "opcode/ppc.h"
 
+#ifdef OBJ_ELF
+#include "elf/ppc.h"
+#endif
+
 /* This is the assembler for the PowerPC or POWER (RS/6000) chips.  */
 
 /* FIXME: This should be handled in a different way.  */
@@ -146,7 +150,7 @@ static struct hash_control *ppc_macro_hash;
 #ifdef OBJ_ELF
 /* Whether to warn about non PC relative relocations that aren't
    in the .got2 section. */
-static int mrelocatable = 0;
+static boolean mrelocatable = false;
 #endif
 
 #ifdef OBJ_COFF
@@ -264,7 +268,7 @@ md_parse_option (c, arg)
 #ifdef OBJ_ELF
       /* -mrelocatable -- warn about initializations that require relocation */
       else if (strcmp (arg, "relocatable") == 0)
-       mrelocatable = 1;
+       mrelocatable = true;
 #endif
       else
        {
@@ -360,6 +364,12 @@ md_begin ()
 
   ppc_set_cpu ();
 
+#ifdef OBJ_ELF
+  /* Set  the -mrelocatable flag bit */
+  if (mrelocatable)
+    bfd_set_private_flags (stdoutput, EF_PPC_RELOCATABLE);
+#endif
+
   /* Insert the opcodes into a hash table.  */
   ppc_hash = hash_new ();
 
@@ -584,8 +594,8 @@ ppc_elf_validate_fix (fixS *fixp, segT seg)
       && strcmp (segment_name (seg), ".got2") != 0
       && strcmp (segment_name (seg), ".stab") != 0)
     {
-      as_bad_where (fixp->fx_file, fixp->fx_line,
-                   "Relocation cannot be done when using -mrelocatable");
+      as_warn_where (fixp->fx_file, fixp->fx_line,
+                    "Relocation cannot be done when using -mrelocatable");
     }
 }
 
This page took 0.037065 seconds and 4 git commands to generate.