* 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.
This commit is contained in:
Ian Lance Taylor 1996-06-19 18:42:42 +00:00
parent 9753202d00
commit 8095b665cb
5 changed files with 72 additions and 14 deletions

View 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.

View File

@ -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

View 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
@ -31,14 +32,14 @@
#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 */

View 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

View 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;