forked from Imagelibrary/binutils-gdb
* as.c (main): Only invoke md_end if it's defined as a macro.
* tc.h (md_end): Don't declare it. * config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do anything. * config/tc-vax.c (vip_end): Deleted null function. * config/tc-mips.c (md_mips_end): Renamed from md_end. * config/tc-mips.h (md_mips_end): Declare. (md_end): New macro, calls md_mips_end. * write.c (write_object_file): Don't close output file. * as.c (main): Close output file (if needed) after calling listing_print, which should be after calling write_object_file, which sets the frag addresses.
This commit is contained in:
17
gas/write.c
17
gas/write.c
@@ -575,18 +575,7 @@ adjust_reloc_syms (abfd, sec, xxx)
|
||||
fixp->fx_offset += S_GET_VALUE (sym);
|
||||
if (sym->sy_frag)
|
||||
fixp->fx_offset += sym->sy_frag->fr_address;
|
||||
if (symseginfo->sym)
|
||||
fixp->fx_addsy = symseginfo->sym;
|
||||
else
|
||||
{
|
||||
fixp->fx_addsy = symbol_find (symsec->name);
|
||||
if (!fixp->fx_addsy)
|
||||
{
|
||||
fixp->fx_addsy = symbol_make (symsec->name);
|
||||
fixp->fx_addsy->bsym = symsec->symbol;
|
||||
}
|
||||
symseginfo->sym = fixp->fx_addsy;
|
||||
}
|
||||
fixp->fx_addsy = section_symbol (symsec);
|
||||
fixp->fx_addsy->sy_used_in_reloc = 1;
|
||||
}
|
||||
|
||||
@@ -1284,8 +1273,6 @@ write_object_file ()
|
||||
/* Write the data to the file */
|
||||
output_file_append (the_object_file, object_file_size, out_file_name);
|
||||
#endif
|
||||
|
||||
output_file_close (out_file_name);
|
||||
} /* non vms output */
|
||||
#else /* VMS */
|
||||
/*
|
||||
@@ -1437,8 +1424,6 @@ write_object_file ()
|
||||
bfd_map_over_sections (stdoutput, write_relocs, (char *) 0);
|
||||
|
||||
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
|
||||
|
||||
output_file_close (out_file_name);
|
||||
#endif /* BFD_ASSEMBLER */
|
||||
}
|
||||
#endif /* ! BFD */
|
||||
|
||||
Reference in New Issue
Block a user