* config/tc-arm.c (make_mapping_symbol): Handle the case
authorJie Zhang <jie.zhang@analog.com>
Wed, 7 Apr 2010 10:39:06 +0000 (10:39 +0000)
committerJie Zhang <jie.zhang@analog.com>
Wed, 7 Apr 2010 10:39:06 +0000 (10:39 +0000)
that multiple mapping symbols have the same value 0.

testsuite/
* gas/arm/mapmisc.s: Test multiple mapping symbols have
the same value 0.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/mapmisc.s

index 75e1e787c264a1fe9216ec55fce5bd20e0620a3d..888e1a70726720564e1a18d69f8d169a0e6d149b 100644 (file)
@@ -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.
index 117812d846bf9ac1d9b81d9efb032c9397a95ed4..3a160c16b56a07bb3ffd8431f56f5af1a4818b23 100644 (file)
@@ -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);
     }
index 51eeafd6540ce4515b52e929e47c9cf90d3aa41b..1e9394396dfaffe7150e19b5b9096044f4a20c3c 100644 (file)
@@ -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.
index 4749e8daab8ffcf93de976a7afd4c4bc354b09aa..1625515f917a2c4929add9aef6b19baeb6a129e8 100644 (file)
@@ -1,6 +1,8 @@
        .text
        .type foo, %function
 foo:
+       .align 2
+       .fill 0, 0, 0
        nop
        .ascii "abcd"
        nop
This page took 0.039418 seconds and 4 git commands to generate.