Align text section ends so that stub tables appears at expected addresses.
authorDoug Kwan <dougkwan@google.com>
Mon, 6 Jul 2015 22:02:40 +0000 (15:02 -0700)
committerDoug Kwan <dougkwan@google.com>
Mon, 6 Jul 2015 22:02:40 +0000 (15:02 -0700)
12 files changed:
gold/ChangeLog
gold/testsuite/arm_bl_out_of_range.s
gold/testsuite/arm_cortex_a8_b.s
gold/testsuite/arm_cortex_a8_b_cond.s
gold/testsuite/arm_cortex_a8_bl.s
gold/testsuite/arm_cortex_a8_blx.s
gold/testsuite/arm_cortex_a8_local.s
gold/testsuite/arm_fix_v4bx.s
gold/testsuite/arm_unaligned_reloc.s
gold/testsuite/thumb_bl_out_of_range.s
gold/testsuite/thumb_bl_out_of_range_local.s
gold/testsuite/thumb_blx_out_of_range.s

index 4b5b860687b1ccf84da24908c5e69471be9e15f3..57468bedc60e2785d6adcb2c58995fb002a3e556 100644 (file)
@@ -1,3 +1,18 @@
+2015-06-29  Doug Kwan  <dougkwan@google.com>
+
+       * testsuite/arm_bl_out_of_range.s: Align stub table so that it appears
+         at address expected by test.
+       * testsuite/arm_cortex_a8_b.s: Ditto.
+       * testsuite/arm_cortex_a8_b_cond.s: Ditto.
+       * testsuite/arm_cortex_a8_bl.s: Ditto.
+       * testsuite/arm_cortex_a8_blx.s: Ditto.
+       * testsuite/arm_cortex_a8_local.s: Ditto.
+       * testsuite/arm_fix_v4bx.s: Ditto.
+       * testsuite/arm_unaligned_reloc.s: Ditto.
+       * testsuite/thumb_bl_out_of_range.s: Ditto.
+       * testsuite/thumb_bl_out_of_range_local.s: Ditto.
+       * testsuite/thumb_blx_out_of_range.s: Ditto.
+       
 2015-06-29  Han Shen  <shenhan@google.com>
 
        Patch for erratum 843419 internal error.
index cb5ff53556bbcc507e66efec66157df557eb1aa2..8ee338a0a07876c98a4b605f8d0fbe6fdaf8b543 100644 (file)
@@ -34,6 +34,9 @@ _forward_test:
        bl      _forward_target
        .size   _forward_test, .-_forward_test
        
+# Align stub table for address matching
+       .align  8
+
        .section        .text.post,"x"
 
 # Add padding so that target is just out of branch range. 
index d2316a073e5fcd519b331d16f69173fca7897531..c63b99e8c61c225eb11d58c10419e002b2dd5f2e 100644 (file)
@@ -28,3 +28,6 @@ _test:
        add.w   r0, r0, 0
        b.w     _func
        .size   _test,.-_test
+
+# Align stub table for address matching.
+       .align  12
index a244aa70300b59a5e66a536ce01beb0d7748d057..d52f970dbd4f5b1549da6cafde11b7f6941bf8e4 100644 (file)
@@ -28,3 +28,6 @@ _test:
        add.w   r0, r0, 0
        beq.w   _func
        .size   _test,.-_test
+
+# Align stub table for address matching.
+       .align  12
index c78fa8d8481bfbcfc0bb7e7a458ddae31ed3ec44..d7b0fa62eedfd3a853d60bd8ad4a6e7dd5cdbc5a 100644 (file)
@@ -28,3 +28,6 @@ _test:
        add.w   r0, r0, 0
        bl      _func
        .size   _test,.-_test
+
+# Align stub table for address matching.
+       .align  12
index c323d25095e4f2731e024d8ce476254772c447a5..076e7c23d866050c2cdf5688718ca6d44d20d14c 100644 (file)
@@ -30,4 +30,9 @@ _test:
 
 # We have no mapping symbols for stubs.  This make the disassembler
 # list the stub correctly in ARM mode.
+       .align  2
        .arm
+
+# Align stub table for address matching.
+       .align  12
+
index 462aa18265b8dad1aaac02dc62567d0a743f1ead..4ff2894a729bcbe29627cbe7f05361179bd851fc 100644 (file)
@@ -27,3 +27,6 @@ _test:
        add.w   r0, r0, 0
        bpl.w   .Lfunc
        .size   _test,.-_test
+
+# Align stub table for address matching.
+       .align  12
index fc3aa2a852e9c8d13f0743167a2b10c08821462b..9d221f6cf50e9cbbcaca5efe07b8327ec06704bd 100644 (file)
@@ -13,3 +13,6 @@ _start:
        bx      r0
        bx      r15
        .size   _start, .-_start
+
+# Align this to 256-byte boundary for easier address matching.
+       .align  8
index 7677bff3733d24f6c1e9527740f938a39e40e3f0..f85297ca454057363aa6b8939b9e1637cafb5627 100644 (file)
@@ -15,7 +15,7 @@ x:
        .word   1
 
        .section        .data.1,"aw",%progbits
-       .align  2
+       .align  12
 
 # This causes following relocations to be unaligned.
        .global padding
index d0906d9d5ceb28a34dbd2f5240bc62c52cc1a309..fa7342d4da62bd7004944869ed349f8055474c8f 100644 (file)
@@ -45,8 +45,11 @@ _forward_test:
        .size   _forward_test, .-_forward_test
        
 # switch back to ARM mode so that stubs are disassembled correctly.
+       .align  2
        .code   32
-       nop
+
+# Align stub table for address matching.
+       .align  8
 
        .section        .text.post,"x"
 
index 48de1e14206f0253ae999081f772b41c5df633db..f477d62ad9015a20b16a22fac0eb6beffb748256 100644 (file)
@@ -45,8 +45,11 @@ _forward_test:
        .size   _forward_test, .-_forward_test
 
 # Switch back to ARM mode so that we can see stubs
+        .align  2
        .code   32
-       nop
+
+# Align stub table for address matching.
+        .align  8
        
        .section        .text.post,"x"
 
index c4f87e0f038a412754454d7d7db8107b9438b665..2dfbf06b6319d85914bd209e39bbe4ad15b9e2fa 100644 (file)
@@ -50,9 +50,12 @@ _forward_test:
        .size   _forward_test, .-_forward_test
 
 # switch back to ARM mode so that stubs are disassembled correctly.
+       .align  2
        .code   32
-       nop
        
+# Align stub table for address matching.
+        .align  8
+
        .section        .text.post,"x"
 
 # Add padding so that target is just out of branch range.