diff options
author | Will Newton <will.newton@linaro.org> | 2014-04-04 10:07:06 +0100 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2014-04-23 13:54:59 +0100 |
commit | 47fc6e36e3863545a6225034d97f64760fffae05 (patch) | |
tree | d1b2248945150582dcd7693a58e789e305eee366 /gas/config | |
parent | 7d64c587c15f290d228ca550bb288d53f0eb2ac4 (diff) | |
download | gdb-47fc6e36e3863545a6225034d97f64760fffae05.zip gdb-47fc6e36e3863545a6225034d97f64760fffae05.tar.gz gdb-47fc6e36e3863545a6225034d97f64760fffae05.tar.bz2 |
gas/arm: Force output of a data mapping symbol for literal pools
If there is a a trailing align statement in a code section we may
output data padding with a data mapping followed by a code alignment
with a code mapping. The literal pool may then be output with a code
mapping symbol which will cause it to be endian swapped in a big-endian
configuration. When outputting a literal pool make sure that a data
mapping symbol is output in all cases.
gas/ChangeLog:
2014-04-23 Will Newton <will.newton@linaro.org>
* config/tc-arm.c (s_ltorg): Call make_mapping_symbol
directly instead of mapping_state.
gas/testsuite/ChangeLog:
2014-04-23 Will Newton <will.newton@linaro.org>
* gas/arm/mapmisc.d: Check literal pool mapping with
a trailing .align statement.
* gas/arm/mapmisc.s: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 9ccacbc..43e58b0 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -3328,8 +3328,6 @@ s_ltorg (int ignored ATTRIBUTE_UNUSED) || pool->next_free_entry == 0) return; - mapping_state (MAP_DATA); - /* Align pool as you have word accesses. Only make a frag if we have to. */ if (!need_pass_2) @@ -3337,6 +3335,9 @@ s_ltorg (int ignored ATTRIBUTE_UNUSED) record_alignment (now_seg, 2); + seg_info (now_seg)->tc_segment_info_data.mapstate = MAP_DATA; + make_mapping_symbol (MAP_DATA, (valueT) frag_now_fix (), frag_now); + sprintf (sym_name, "$$lit_\002%x", pool->id); symbol_locate (pool->symbol, sym_name, now_seg, |