aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-06-19 18:42:42 +0000
committerIan Lance Taylor <ian@airs.com>1996-06-19 18:42:42 +0000
commit8095b665cb218ed8d9a617362fec29d570250a8a (patch)
tree90a6d1234bcaf2bb2a4093ba87d273fc83b140b2 /gas/write.c
parent9753202d00b3bdbbda6e66b42aab00a4440e81ff (diff)
downloadgdb-8095b665cb218ed8d9a617362fec29d570250a8a.zip
gdb-8095b665cb218ed8d9a617362fec29d570250a8a.tar.gz
gdb-8095b665cb218ed8d9a617362fec29d570250a8a.tar.bz2
* 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.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/gas/write.c b/gas/write.c
index 97df4fb..eb267c7 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -272,11 +272,13 @@ 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;
case O_uminus:
@@ -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;