From: Hans-Peter Nilsson Date: Mon, 10 Sep 2012 10:05:03 +0000 (+0000) Subject: PR gas/14521 X-Git-Tag: binutils-2_23~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a791ec3c0bfe141380119607ea579cf8c162abe;p=thirdparty%2Fbinutils-gdb.git PR gas/14521 * config/tc-mmix.h (tc_frob_file_before_fix): Renumber sections after call to mmix_frob_file. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index dc5b3039543..f2a949cc9fd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2012-09-10 Hans-Peter Nilsson + PR gas/14521 + * config/tc-mmix.h (tc_frob_file_before_fix): Renumber sections + after call to mmix_frob_file. + * config/tc-mmix.c (loc_asserts): New variable. (mmix_greg_internal): Handle expressions not determinable at first pass. diff --git a/gas/config/tc-mmix.h b/gas/config/tc-mmix.h index ef901620a82..dba24a2d38c 100644 --- a/gas/config/tc-mmix.h +++ b/gas/config/tc-mmix.h @@ -194,7 +194,18 @@ extern fragS *mmix_opcode_frag; fixups are done and relocs are output. Similarly for each unknown symbol. */ extern void mmix_frob_file (void); -#define tc_frob_file_before_fix mmix_frob_file +#define tc_frob_file_before_fix() \ + do \ + { \ + int i = 0; \ + \ + /* It's likely mmix_frob_file changed (removed) sections, so make \ + sure sections are correctly numbered as per renumber_sections, \ + (static to write.c where this macro is called). */ \ + mmix_frob_file (); \ + bfd_map_over_sections (stdoutput, renumber_sections, &i); \ + } \ + while (0) /* Used by mmix_frob_file. Hangs on section symbols and unknown symbols. */ struct mmix_symbol_gregs;