From 6868afe647e1646d2bef0d3155989c9f9c2006a1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 20 Dec 1993 16:48:00 +0000 Subject: * 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. --- gas/write.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 0f86417..8b920a9 100644 --- a/gas/write.c +++ b/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 */ -- cgit v1.1