* config/tc-mn10200.c (md_parse_option <c, arg>): Add ATTRIBUTE_UNUSED.
authorAlan Modra <amodra@gmail.com>
Thu, 12 Dec 2002 22:09:12 +0000 (22:09 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 12 Dec 2002 22:09:12 +0000 (22:09 +0000)
(md_undefined_symbol <name>): Likewise.
(md_convert_frag <abfd>): Likewise.
(tc_gen_reloc <seg>): Likewise.
(check_operand <insn>): Likewise.
(md_convert_frag): Fix format strings.
(tc_gen_reloc): Delete fx_addsy - fx_subsy code.

gas/ChangeLog
gas/config/tc-mn10200.c

index c8361ff4405e71a1b8c1b22c55760f149443f1f7..57c4f553ed494ff2e55fe32ed8d746a1182f3550 100644 (file)
@@ -1,5 +1,12 @@
 2002-12-13  Alan Modra  <amodra@bigpond.net.au>
 
+       * config/tc-mn10200.c (md_parse_option <c, arg>): Add ATTRIBUTE_UNUSED.
+       (md_undefined_symbol <name>): Likewise.
+       (md_convert_frag <abfd>): Likewise.
+       (tc_gen_reloc <seg>): Likewise.
+       (check_operand <insn>): Likewise.
+       (md_convert_frag): Fix format strings.
+       (tc_gen_reloc): Delete fx_addsy - fx_subsy code.
        * config/tc-openrisc.c (ignore_pseudo): Prototype.
        (md_atof): Remove declaration of atof_ieee.
        * config/tc-or32.c (parse_operand): Prototype non-BFD too.
index 5c27dc063e8a9989d1197138579d60df7eff63a9..ec0a9307913d7f91ec94f494756560eee51d1265 100644 (file)
@@ -322,15 +322,15 @@ none yet\n"));
 
 int
 md_parse_option (c, arg)
-     int c;
-     char *arg;
+     int c ATTRIBUTE_UNUSED;
+     char *arg ATTRIBUTE_UNUSED;
 {
   return 0;
 }
 
 symbolS *
 md_undefined_symbol (name)
-     char *name;
+     char *name ATTRIBUTE_UNUSED;
 {
   return 0;
 }
@@ -378,7 +378,7 @@ md_atof (type, litp, sizep)
 
 void
 md_convert_frag (abfd, sec, fragP)
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
      asection *sec;
      fragS *fragP;
 {
@@ -437,7 +437,7 @@ md_convert_frag (abfd, sec, fragP)
       fragP->fr_literal[offset] = opcode;
 
       /* Create a fixup for the reversed conditional branch.  */
-      sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+      sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
               symbol_new (buf, sec, 0, fragP->fr_next),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
@@ -494,7 +494,7 @@ md_convert_frag (abfd, sec, fragP)
       fragP->fr_literal[offset] = opcode;
 
       /* Create a fixup for the reversed conditional branch.  */
-      sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+      sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 1, 1,
               symbol_new (buf, sec, 0, fragP->fr_next),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
@@ -582,7 +582,7 @@ md_convert_frag (abfd, sec, fragP)
       fragP->fr_literal[offset + 1] = opcode;
 
       /* Create a fixup for the reversed conditional branch.  */
-      sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+      sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
               symbol_new (buf, sec, 0, fragP->fr_next),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
@@ -662,7 +662,7 @@ md_convert_frag (abfd, sec, fragP)
       fragP->fr_literal[offset + 1] = opcode;
 
       /* Create a fixup for the reversed conditional branch.  */
-      sprintf (buf, ".%s_%d", FAKE_LABEL_NAME, label_count++);
+      sprintf (buf, ".%s_%ld", FAKE_LABEL_NAME, label_count++);
       fix_new (fragP, fragP->fr_fix + 2, 1,
               symbol_new (buf, sec, 0, fragP->fr_next),
               fragP->fr_offset, 1, BFD_RELOC_8_PCREL);
@@ -1227,7 +1227,7 @@ keep_going:
 
 arelent *
 tc_gen_reloc (seg, fixp)
-     asection *seg;
+     asection *seg ATTRIBUTE_UNUSED;
      fixS *fixp;
 {
   arelent *reloc;
@@ -1242,26 +1242,9 @@ tc_gen_reloc (seg, fixp)
       return NULL;
     }
   reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
-
-  if (fixp->fx_addsy && fixp->fx_subsy)
-    {
-      if ((S_GET_SEGMENT (fixp->fx_addsy) != S_GET_SEGMENT (fixp->fx_subsy))
-         || S_GET_SEGMENT (fixp->fx_addsy) == undefined_section)
-       {
-         as_bad_where (fixp->fx_file, fixp->fx_line,
-                       "Difference of symbols in different sections is not supported");
-         return NULL;
-       }
-      reloc->sym_ptr_ptr = &bfd_abs_symbol;
-      reloc->addend = (S_GET_VALUE (fixp->fx_addsy)
-                      - S_GET_VALUE (fixp->fx_subsy) + fixp->fx_offset);
-    }
-  else
-    {
-      reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
-      *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
-      reloc->addend = fixp->fx_offset;
-    }
+  reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+  *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+  reloc->addend = fixp->fx_offset;
   return reloc;
 }
 
@@ -1375,7 +1358,7 @@ mn10200_insert_operand (insnp, extensionp, operand, val, file, line, shift)
 
 static unsigned long
 check_operand (insn, operand, val)
-     unsigned long insn;
+     unsigned long insn ATTRIBUTE_UNUSED;
      const struct mn10200_operand *operand;
      offsetT val;
 {
This page took 0.030512 seconds and 4 git commands to generate.