ARM: 8322/1: keep .text and .fixup regions closer together
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 24 Mar 2015 09:41:09 +0000 (10:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 29 Mar 2015 22:11:56 +0000 (23:11 +0100)
This moves all fixup snippets to the .text.fixup section, which is
a special section that gets emitted along with the .text section
for each input object file, i.e., the snippets are kept much closer
to the code they refer to, which helps prevent linker failure on
large kernels.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/futex.h
arch/arm/include/asm/uaccess.h
arch/arm/include/asm/word-at-a-time.h
arch/arm/kernel/entry-armv.S
arch/arm/kernel/swp_emulate.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/lib/clear_user.S
arch/arm/lib/copy_to_user.S
arch/arm/lib/csumpartialcopyuser.S
arch/arm/mm/alignment.c
arch/arm/nwfpe/entry.S

index 53e69dae796f32e495ab262953d4b52cce0cc303..4e78065a16aa3c6a3dae5db147f36fda00dcf18a 100644 (file)
@@ -13,7 +13,7 @@
        "       .align  3\n"                                    \
        "       .long   1b, 4f, 2b, 4f\n"                       \
        "       .popsection\n"                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "4:     mov     %0, " err_reg "\n"                      \
        "       b       3b\n"                                   \
index ce0786efd26c3485d28baa6b7857e35350c1336d..74b17d09ef7aa54cb98d22ccf5f068b4c39971be 100644 (file)
@@ -315,7 +315,7 @@ do {                                                                        \
        __asm__ __volatile__(                                   \
        "1:     " TUSER(ldrb) " %1,[%2],#0\n"                   \
        "2:\n"                                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "3:     mov     %0, %3\n"                               \
        "       mov     %1, #0\n"                               \
@@ -351,7 +351,7 @@ do {                                                                        \
        __asm__ __volatile__(                                   \
        "1:     " TUSER(ldr) "  %1,[%2],#0\n"                   \
        "2:\n"                                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "3:     mov     %0, %3\n"                               \
        "       mov     %1, #0\n"                               \
@@ -397,7 +397,7 @@ do {                                                                        \
        __asm__ __volatile__(                                   \
        "1:     " TUSER(strb) " %1,[%2],#0\n"                   \
        "2:\n"                                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "3:     mov     %0, %3\n"                               \
        "       b       2b\n"                                   \
@@ -430,7 +430,7 @@ do {                                                                        \
        __asm__ __volatile__(                                   \
        "1:     " TUSER(str) "  %1,[%2],#0\n"                   \
        "2:\n"                                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "3:     mov     %0, %3\n"                               \
        "       b       2b\n"                                   \
@@ -458,7 +458,7 @@ do {                                                                        \
  THUMB(        "1:     " TUSER(str) "  " __reg_oper1 ", [%1]\n"        ) \
  THUMB(        "2:     " TUSER(str) "  " __reg_oper0 ", [%1, #4]\n"    ) \
        "3:\n"                                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
+       "       .pushsection .text.fixup,\"ax\"\n"              \
        "       .align  2\n"                                    \
        "4:     mov     %0, %3\n"                               \
        "       b       3b\n"                                   \
index a6d0a29861e7cef407a5514c5a2d8687726d4a30..5831dce4b51c33e9b95bd8d2300467c557143eb6 100644 (file)
@@ -71,7 +71,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
        asm(
        "1:     ldr     %0, [%2]\n"
        "2:\n"
-       "       .pushsection .fixup,\"ax\"\n"
+       "       .pushsection .text.fixup,\"ax\"\n"
        "       .align 2\n"
        "3:     and     %1, %2, #0x3\n"
        "       bic     %2, %2, #0x3\n"
index 672b21942fff77581d13959039b518a36a1e1eef..570306c494068f2ac8f841eb3344b4f981f7a3bb 100644 (file)
@@ -545,7 +545,7 @@ ENDPROC(__und_usr)
 /*
  * The out of line fixup for the ldrt instructions above.
  */
-       .pushsection .fixup, "ax"
+       .pushsection .text.fixup, "ax"
        .align  2
 4:     str     r4, [sp, #S_PC]                 @ retry current instruction
        ret     r9
index afdd51e30bec073fd1efc5c1b65e104c8c89ea2d..1361756782c73b49c499f50bc4f423647e2edd3f 100644 (file)
@@ -42,7 +42,7 @@
        "       cmp             %0, #0\n"                       \
        "       movne           %0, %4\n"                       \
        "2:\n"                                                  \
-       "       .section         .fixup,\"ax\"\n"               \
+       "       .section         .text.fixup,\"ax\"\n"          \
        "       .align          2\n"                            \
        "3:     mov             %0, %5\n"                       \
        "       b               2b\n"                           \
index e8d5fba807a0279b41040bb56858aaaac544cdc1..7a301be9ac6784e999f2aa44a91cae1edb3f62a0 100644 (file)
@@ -74,7 +74,7 @@ SECTIONS
                ARM_EXIT_DISCARD(EXIT_DATA)
                EXIT_CALL
 #ifndef CONFIG_MMU
-               *(.fixup)
+               *(.text.fixup)
                *(__ex_table)
 #endif
 #ifndef CONFIG_SMP_ON_UP
@@ -109,9 +109,6 @@ SECTIONS
                        SCHED_TEXT
                        LOCK_TEXT
                        KPROBES_TEXT
-#ifdef CONFIG_MMU
-                       *(.fixup)
-#endif
                        *(.gnu.warning)
                        *(.glue_7)
                        *(.glue_7t)
index 14a0d988c82cb41ab88acd4d924bf75aa87efce3..1710fd7db2d57d35ed342417336980f987db5985 100644 (file)
@@ -47,7 +47,7 @@ USER(         strnebt r2, [r0])
 ENDPROC(__clear_user)
 ENDPROC(__clear_user_std)
 
-               .pushsection .fixup,"ax"
+               .pushsection .text.fixup,"ax"
                .align  0
 9001:          ldmfd   sp!, {r0, pc}
                .popsection
index a9d3db16ecb5738234dc14defe8a4d2f21f60fef..9648b0675a3efc81dd412fa5b3be820c1a3d6242 100644 (file)
@@ -100,7 +100,7 @@ WEAK(__copy_to_user)
 ENDPROC(__copy_to_user)
 ENDPROC(__copy_to_user_std)
 
-       .pushsection .fixup,"ax"
+       .pushsection .text.fixup,"ax"
        .align 0
        copy_abort_preamble
        ldmfd   sp!, {r1, r2, r3}
index 7d08b43d2c0e496fc704378301b82d3b34d93f3a..1d0957e61f898ab6ab43759496e85c8b247218d1 100644 (file)
@@ -68,7 +68,7 @@
  * so properly, we would have to add in whatever registers were loaded before
  * the fault, which, with the current asm above is not predictable.
  */
-               .pushsection .fixup,"ax"
+               .pushsection .text.fixup,"ax"
                .align  4
 9001:          mov     r4, #-EFAULT
                ldr     r5, [sp, #8*4]          @ *err_ptr
index 2c0c541c60caaafe76943ec3bb65a79da990f5c2..9769f1eefe3bc51b29188576a5e2aacc2f1dcedc 100644 (file)
@@ -201,7 +201,7 @@ union offset_union {
  THUMB(        "1:     "ins"   %1, [%2]\n"     )               \
  THUMB(        "       add     %2, %2, #1\n"   )               \
        "2:\n"                                          \
-       "       .pushsection .fixup,\"ax\"\n"           \
+       "       .pushsection .text.fixup,\"ax\"\n"      \
        "       .align  2\n"                            \
        "3:     mov     %0, #1\n"                       \
        "       b       2b\n"                           \
@@ -261,7 +261,7 @@ union offset_union {
                "       mov     %1, %1, "NEXT_BYTE"\n"          \
                "2:     "ins"   %1, [%2]\n"                     \
                "3:\n"                                          \
-               "       .pushsection .fixup,\"ax\"\n"           \
+               "       .pushsection .text.fixup,\"ax\"\n"      \
                "       .align  2\n"                            \
                "4:     mov     %0, #1\n"                       \
                "       b       3b\n"                           \
@@ -301,7 +301,7 @@ union offset_union {
                "       mov     %1, %1, "NEXT_BYTE"\n"          \
                "4:     "ins"   %1, [%2]\n"                     \
                "5:\n"                                          \
-               "       .pushsection .fixup,\"ax\"\n"           \
+               "       .pushsection .text.fixup,\"ax\"\n"      \
                "       .align  2\n"                            \
                "6:     mov     %0, #1\n"                       \
                "       b       5b\n"                           \
index 5d65be1f1e8a758b297f142254ad9eeb77146c9d..71df4354765927da922606db930c6665cbd0c7f9 100644 (file)
@@ -113,7 +113,7 @@ next:
        @ to fault.  Emit the appropriate exception gunk to fix things up.
        @ ??? For some reason, faults can happen at .Lx2 even with a
        @ plain LDR instruction.  Weird, but it seems harmless.
-       .pushsection .fixup,"ax"
+       .pushsection .text.fixup,"ax"
        .align  2
 .Lfix: ret     r9                      @ let the user eat segfaults
        .popsection
This page took 0.617452 seconds and 5 git commands to generate.