diff options
author | Jie Zhang <jie.zhang@analog.com> | 2010-04-07 10:39:06 +0000 |
---|---|---|
committer | Jie Zhang <jie.zhang@analog.com> | 2010-04-07 10:39:06 +0000 |
commit | 2de7820f275d96335a4749e2239aace063e1087d (patch) | |
tree | 24d59ff4c60f9a228fd4a566433768fa989c236d /gas | |
parent | 397841b5aed514e848c022e64ef1cfc5fa68afcc (diff) | |
download | gdb-2de7820f275d96335a4749e2239aace063e1087d.zip gdb-2de7820f275d96335a4749e2239aace063e1087d.tar.gz gdb-2de7820f275d96335a4749e2239aace063e1087d.tar.bz2 |
* config/tc-arm.c (make_mapping_symbol): Handle the case
that multiple mapping symbols have the same value 0.
testsuite/
* gas/arm/mapmisc.s: Test multiple mapping symbols have
the same value 0.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 17 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapmisc.s | 2 |
4 files changed, 23 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 75e1e78..888e1a7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2010-04-07 Jie Zhang <jie@codesourcery.com> + + * config/tc-arm.c (make_mapping_symbol): Handle the case + that multiple mapping symbols have the same value 0. + 2010-04-07 Alan Modra <amodra@gmail.com> * configure: Regenerate. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 117812d..3a160c1 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -2493,19 +2493,24 @@ make_mapping_symbol (enum mstate state, valueT value, fragS *frag) /* Save the mapping symbols for future reference. Also check that we do not place two mapping symbols at the same offset within a frag. We'll handle overlap between frags in - check_mapping_symbols. */ + check_mapping_symbols. + + 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 (value == 0) { - know (frag->tc_frag_data.first_map == NULL); + if (frag->tc_frag_data.first_map != NULL) + { + know (S_GET_VALUE (frag->tc_frag_data.first_map) == 0); + symbol_remove (frag->tc_frag_data.first_map, &symbol_rootP, &symbol_lastP); + } 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)); - /* 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); } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 51eeafd..1e93943 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-04-07 Jie Zhang <jie@codesourcery.com> + + * gas/arm/mapmisc.s: Test multiple mapping symbols have + the same value 0. + 2010-04-06 Peter Bergner <bergner@vnet.ibm.com> * gas/ppc/476.d ("dccci", "dci", "iccci"): Add tests. diff --git a/gas/testsuite/gas/arm/mapmisc.s b/gas/testsuite/gas/arm/mapmisc.s index 4749e8d..1625515 100644 --- a/gas/testsuite/gas/arm/mapmisc.s +++ b/gas/testsuite/gas/arm/mapmisc.s @@ -1,6 +1,8 @@ .text .type foo, %function foo: + .align 2 + .fill 0, 0, 0 nop .ascii "abcd" nop |