* as.c (emulation_name): Remove unused static variable.
authorIan Lance Taylor <ian@airs.com>
Wed, 19 Jun 1996 18:42:42 +0000 (18:42 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 19 Jun 1996 18:42:42 +0000 (18:42 +0000)
(default_emul_bfd_name): Add return NULL to avoid warning.
* ecoff.c (ecoff_stab): Remove unused variables name and
name_end.
* frags.c (frag_new): Remove unused variable tmp.
* hash.c (hash_grow): Parenthesize + within <<.
(hash_print_statistics): Use %lu, not %d, to print unsigned
long variables.
* messages.c: Include "libiberty.h".
(fprint_value): Add cast to avoid printf warning.
(sprint_value): Likewise.
* read.c: Include "ecoff.h".
(emit_expr): Add casts to avoid printf warnings.
* read.h: Use extern for function declarations.
(pop_insert): Declare.
* stabs.c: Include "ecoff.h".
* subsegs.c (subseg_set_rest): Remove unused variables tmp,
former_last_fragP, and new_fragP.
* subsegs.h (subsegs_print_statistics): Declare.
* symbols.c (debug_verify_symchain): Change macro to discard
arguments.
* write.c (dump_section_relocs): Likewise.
* write.h: Use extern for function declarations.
(write_print_statistics): Declare.
* config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid
warning.
* config/e-mipself.c (mipself_bfd_name): Likewise.
* config/obj-elf.h (elf_ecoff_set_ext): Declare.

gas/ChangeLog
gas/as.c
gas/config/obj-elf.h
gas/symbols.c
gas/write.c

index 3c271915dacfef01a2b2610c892dc01367eebe23..1d32dfee60035ad3456cf662cd4bc0bfef3c7fea 100644 (file)
@@ -1,5 +1,37 @@
 Wed Jun 19 11:31:50 1996  Ian Lance Taylor  <ian@cygnus.com>
 
+       * config/tc-mips.c (mips_ip): In cases 'I', 'i', and 'j', set
+       insn_error rather than calling check_absolute_expr.
+
+       * as.c (emulation_name): Remove unused static variable.
+       (default_emul_bfd_name): Add return NULL to avoid warning.
+       * ecoff.c (ecoff_stab): Remove unused variables name and
+       name_end.
+       * frags.c (frag_new): Remove unused variable tmp.
+       * hash.c (hash_grow): Parenthesize + within <<.
+       (hash_print_statistics): Use %lu, not %d, to print unsigned
+       long variables.
+       * messages.c: Include "libiberty.h".
+       (fprint_value): Add cast to avoid printf warning.
+       (sprint_value): Likewise.
+       * read.c: Include "ecoff.h".
+       (emit_expr): Add casts to avoid printf warnings.
+       * read.h: Use extern for function declarations.
+       (pop_insert): Declare.
+       * stabs.c: Include "ecoff.h".
+       * subsegs.c (subseg_set_rest): Remove unused variables tmp,
+       former_last_fragP, and new_fragP.
+       * subsegs.h (subsegs_print_statistics): Declare.
+       * symbols.c (debug_verify_symchain): Change macro to discard
+       arguments.
+       * write.c (dump_section_relocs): Likewise.
+       * write.h: Use extern for function declarations.
+       (write_print_statistics): Declare.
+       * config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid
+       warning.
+       * config/e-mipself.c (mipself_bfd_name): Likewise.
+       * config/obj-elf.h (elf_ecoff_set_ext): Declare.
+
        * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): If OBJ_ELF, always
        emit relocations against external symbols.
 
index 2c56241bb369426a83e849fa61188bd1d7672649..4062f62b34a2720e57d7234a28ab83e6da711596 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -129,7 +129,6 @@ Options:\n\
 extern struct emulation mipsbelf, mipslelf, mipself;
 extern struct emulation mipsbecoff, mipslecoff, mipsecoff;
 
-static const char *emulation_name;
 static struct emulation *const emulations[] = { EMULATIONS };
 static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
 
@@ -183,6 +182,7 @@ const char *
 default_emul_bfd_name ()
 {
   abort ();
+  return NULL;
 }
 
 void
@@ -541,6 +541,7 @@ main (argc, argv)
   hex_init ();
 #ifdef BFD_ASSEMBLER
   bfd_init ();
+  bfd_set_error_program_name (myname);
 #endif
 
 #ifdef USE_EMULATIONS
index b86a742c6372740cece56005684f5ba216dc1339..abd7a00cbd5ccf89d41f0410c1138a5ea72f471c 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF object file format.
-   Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -14,8 +14,9 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GAS; see the file COPYING.  If not, write to
-   the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   along with GAS; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.  */
 
 
 /* HP PA-RISC support was contributed by the Center for Software Science
 #include <bfd.h>
 
 #define BYTES_IN_WORD 4                /* for now */
-#include "bfd/libelf.h"
+#include "bfd/elf-bfd.h"
 
 /* Use this to keep track of .size expressions that involve differences
    that we can't compute yet.  */
 #define OBJ_SYMFIELD_TYPE expressionS *
 
 /* Symbol fields used by the ELF back end.  */
-#define ELF_TARGET_SYMBOL_FIELDS int local:1; unsigned long sy_name_offset;
+#define ELF_TARGET_SYMBOL_FIELDS int local:1;
 
 /* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead.  */
 #define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS
@@ -112,14 +113,22 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
 #undef SEPARATE_STAB_SECTIONS
 #undef INIT_STAB_SECTION
 #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
-  ecoff_stab ((what), (string), (type), (other), (desc))
+  ecoff_stab ((seg), (what), (string), (type), (other), (desc))
 
 #define OBJ_GENERATE_ASM_LINENO(filename, lineno) \
   ecoff_generate_asm_lineno ((filename), (lineno))
 
 #endif /* ECOFF_DEBUGGING */
 
-extern void elf_frob_symbol PARAMS ((struct symbol *));
-#define obj_frob_symbol(symp, punt) elf_frob_symbol (symp)
+extern void elf_frob_symbol PARAMS ((struct symbol *, int *));
+#define obj_frob_symbol(symp, punt) elf_frob_symbol (symp, &punt)
+
+extern void elf_pop_insert PARAMS ((void));
+#define obj_pop_insert()       elf_pop_insert()
+
+#ifndef OBJ_MAYBE_ELF
+#define obj_ecoff_set_ext elf_ecoff_set_ext
+extern void elf_ecoff_set_ext ();
+#endif
 
 #endif /* _OBJ_ELF_H */
index bee5b9aa361ca7fa86e7964f163d3cd4d9d8cc2e..b1212cbd42cd14ded38ac752a624a769d668ebac 100644 (file)
@@ -46,7 +46,7 @@ symbolS abs_symbol;
 #ifdef DEBUG_SYMS
 #define debug_verify_symchain verify_symbol_chain
 #else
-#define debug_verify_symchain (void)
+#define debug_verify_symchain(root, last) ((void) 0)
 #endif
 
 struct obstack notes;
@@ -173,7 +173,7 @@ colon (sym_name)            /* just seen "x:" - rattle symbols & frags */
 
   /* Sun local labels go out of scope whenever a non-local symbol is
      defined.  */
-  if (LOCAL_LABELS_DOLLAR && *sym_name != 'L')
+  if (LOCAL_LABELS_DOLLAR && ! LOCAL_LABEL (sym_name))
     dollar_label_clear ();
 
 #ifndef WORKING_DOT_WORD
index 97df4fb1553772df00bd733440115aacce34515c..eb267c7daf84eb1bd3756501b9f0812a0070dbd9 100644 (file)
@@ -272,10 +272,12 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
 
 #if defined(BFD_ASSEMBLER)
       r_type = BFD_RELOC_RVA;
-#elif defined(TC_RVA_RELOC)
+#else
+#if defined(TC_RVA_RELOC)
       r_type = TC_RVA_RELOC;
 #else
       as_fatal("rva not supported");
+#endif
 #endif
       break;
 
@@ -627,7 +629,7 @@ dump_section_relocs (abfd, sec, stream_)
     }
 }
 #else
-#define dump_section_relocs(ABFD,SEC,STREAM)   (void)(ABFD,SEC,STREAM)
+#define dump_section_relocs(ABFD,SEC,STREAM)   ((void) 0)
 #endif
 
 #ifndef EMIT_SECTION_SYMBOLS
@@ -672,13 +674,27 @@ adjust_reloc_syms (abfd, sec, xxx)
            goto done;
          }
 
+       if (bfd_is_abs_section (symsec))
+         {
+           /* The fixup_segment routine will not use this symbol in a
+               relocation unless TC_FORCE_RELOCATION returns 1.  */
+           if (TC_FORCE_RELOCATION (fixp))
+             {
+               fixp->fx_addsy->sy_used_in_reloc = 1;
+#ifdef UNDEFINED_DIFFERENCE_OK
+               if (fixp->fx_subsy != NULL)
+                 fixp->fx_subsy->sy_used_in_reloc = 1;
+#endif
+             }
+           goto done;
+         }
+
        /* If it's one of these sections, assume the symbol is
           definitely going to be output.  The code in
           md_estimate_size_before_relax in tc-mips.c uses this test
           as well, so if you change this code you should look at that
           code.  */
        if (bfd_is_und_section (symsec)
-           || bfd_is_abs_section (symsec)
            || bfd_is_com_section (symsec))
          {
            fixp->fx_addsy->sy_used_in_reloc = 1;