aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2012-09-01 18:10:50 +0000
committerHans-Peter Nilsson <hp@axis.com>2012-09-01 18:10:50 +0000
commit6c1065151f0c42e978fb1bc232e45851811eb76c (patch)
tree4f2cca4e13e4f3ad5816e054cca87e7a4b9b58b8 /gas/config
parent9c75beeb5a4886071f0e6602879a4bf3e6eebe63 (diff)
downloadgdb-6c1065151f0c42e978fb1bc232e45851811eb76c.zip
gdb-6c1065151f0c42e978fb1bc232e45851811eb76c.tar.gz
gdb-6c1065151f0c42e978fb1bc232e45851811eb76c.tar.bz2
PR gas/14521
* config/tc-mmix.h (tc_frob_file_before_fix): Renumber sections after call to mmix_frob_file.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mmix.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gas/config/tc-mmix.h b/gas/config/tc-mmix.h
index ef90162..dba24a2 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;