aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/gas/write.c b/gas/write.c
index 000e790..7964934 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1042,7 +1042,7 @@ write_object_file ()
n_errs = had_errors ();
/* The -Z flag indicates that an object file should be generated,
regardless of warnings and errors. */
- if (flagseen['Z'])
+ if (flag_always_generate_output)
{
if (n_warns || n_errs)
as_warn ("%d error%s, %d warning%s, generating bad object file.\n",
@@ -1128,7 +1128,7 @@ write_object_file ()
data frags into the text segment. Do this before relaxing so
we know to take advantage of -R and make shorter addresses. */
#if !defined (OBJ_AOUT) || defined (BFD_ASSEMBLER)
- if (flagseen['R'])
+ if (flag_readonly_data_in_text)
{
merge_data_into_text ();
}
@@ -1485,6 +1485,16 @@ write_object_file ()
}
}
+ /* Now do any format-specific adjustments to the symbol table, such
+ as adding file symbols. */
+#ifdef obj_adjust_symtab
+ obj_adjust_symtab ();
+#endif
+
+ /* Now that all the sizes are known, and contents correct, we can
+ start writing to the file. */
+ set_symtab ();
+
/* If *_frob_file changes the symbol value at this point, it is
responsible for moving the changed value into symp->bsym->value
as well. Hopefully all symbol value changing can be done in
@@ -1496,10 +1506,6 @@ write_object_file ()
obj_frob_file ();
#endif
- /* Now that all the sizes are known, and contents correct, we can
- start writing to the file. */
- set_symtab ();
-
bfd_map_over_sections (stdoutput, write_relocs, (char *) 0);
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
@@ -1679,7 +1685,7 @@ relax_segment (segment_frag_root, segment)
+ S_GET_VALUE (lie->sub)));
if (offset <= -32768 || offset >= 32767)
{
- if (flagseen['K'])
+ if (flag_warn_displacement)
{
char buf[50];
sprint_value (buf, (addressT) lie->addnum);
@@ -2161,7 +2167,7 @@ fixup_segment (fixP, this_segment_type)
/* Warn if a .word value is too large when treated as a signed
number. We already know it is not too negative. This is to
catch over-large switches generated by gcc on the 68k. */
- if (!flagseen['J']
+ if (!flag_signed_overflow_ok
&& size == 2
&& add_number > 0x7fff)
as_bad_where (fixP->fx_file, fixP->fx_line,