aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2010-03-19 14:43:09 +0000
committerJie Zhang <jie.zhang@analog.com>2010-03-19 14:43:09 +0000
commit0f020cefaaafef23c09c563bb2f39794117a9748 (patch)
treef3488d22934956e74e7773f0ac90033d4b4a6aed /gas/config
parent860deac3a2e14413139a4b06baca3caa8449e64b (diff)
downloadfsf-binutils-gdb-0f020cefaaafef23c09c563bb2f39794117a9748.zip
fsf-binutils-gdb-0f020cefaaafef23c09c563bb2f39794117a9748.tar.gz
fsf-binutils-gdb-0f020cefaaafef23c09c563bb2f39794117a9748.tar.bz2
* config/tc-arm.c (make_mapping_symbol): Hanle the case
that two mapping symbols have the same value. testsuite/ * gas/arm/mapmisc.s: Add the test case for two mapping symbols having the same value. * gas/arm/mapmisc.d: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 557b9f9..117812d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -2500,7 +2500,15 @@ make_mapping_symbol (enum mstate state, valueT value, fragS *frag)
frag->tc_frag_data.first_map = symbolP;
}
if (frag->tc_frag_data.last_map != NULL)
- know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));
+ {
+ know (S_GET_VALUE (frag->tc_frag_data.last_map) <= S_GET_VALUE (symbolP));
+ /* If .fill or other data filling directive generates zero sized data,
+ the mapping symbol for the following code will have the same value
+ as the one generated for the data filling directive. In this case,
+ we replace the old symbol with the new one at the same address. */
+ if (S_GET_VALUE (frag->tc_frag_data.last_map) == S_GET_VALUE (symbolP))
+ symbol_remove (frag->tc_frag_data.last_map, &symbol_rootP, &symbol_lastP);
+ }
frag->tc_frag_data.last_map = symbolP;
}