Skip to content

Commit c4a84ae

Browse files
Ard BiesheuvelRussell King
Ard Biesheuvel
authored and
Russell King
committed
ARM: 8322/1: keep .text and .fixup regions closer together
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 <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 779c88c commit c4a84ae

File tree

11 files changed

+17
-20
lines changed

11 files changed

+17
-20
lines changed

arch/arm/include/asm/futex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
" .align 3\n" \
1414
" .long 1b, 4f, 2b, 4f\n" \
1515
" .popsection\n" \
16-
" .pushsection .fixup,\"ax\"\n" \
16+
" .pushsection .text.fixup,\"ax\"\n" \
1717
" .align 2\n" \
1818
"4: mov %0, " err_reg "\n" \
1919
" b 3b\n" \

arch/arm/include/asm/uaccess.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ do { \
315315
__asm__ __volatile__( \
316316
"1: " TUSER(ldrb) " %1,[%2],#0\n" \
317317
"2:\n" \
318-
" .pushsection .fixup,\"ax\"\n" \
318+
" .pushsection .text.fixup,\"ax\"\n" \
319319
" .align 2\n" \
320320
"3: mov %0, %3\n" \
321321
" mov %1, #0\n" \
@@ -351,7 +351,7 @@ do { \
351351
__asm__ __volatile__( \
352352
"1: " TUSER(ldr) " %1,[%2],#0\n" \
353353
"2:\n" \
354-
" .pushsection .fixup,\"ax\"\n" \
354+
" .pushsection .text.fixup,\"ax\"\n" \
355355
" .align 2\n" \
356356
"3: mov %0, %3\n" \
357357
" mov %1, #0\n" \
@@ -397,7 +397,7 @@ do { \
397397
__asm__ __volatile__( \
398398
"1: " TUSER(strb) " %1,[%2],#0\n" \
399399
"2:\n" \
400-
" .pushsection .fixup,\"ax\"\n" \
400+
" .pushsection .text.fixup,\"ax\"\n" \
401401
" .align 2\n" \
402402
"3: mov %0, %3\n" \
403403
" b 2b\n" \
@@ -430,7 +430,7 @@ do { \
430430
__asm__ __volatile__( \
431431
"1: " TUSER(str) " %1,[%2],#0\n" \
432432
"2:\n" \
433-
" .pushsection .fixup,\"ax\"\n" \
433+
" .pushsection .text.fixup,\"ax\"\n" \
434434
" .align 2\n" \
435435
"3: mov %0, %3\n" \
436436
" b 2b\n" \
@@ -458,7 +458,7 @@ do { \
458458
THUMB( "1: " TUSER(str) " " __reg_oper1 ", [%1]\n" ) \
459459
THUMB( "2: " TUSER(str) " " __reg_oper0 ", [%1, #4]\n" ) \
460460
"3:\n" \
461-
" .pushsection .fixup,\"ax\"\n" \
461+
" .pushsection .text.fixup,\"ax\"\n" \
462462
" .align 2\n" \
463463
"4: mov %0, %3\n" \
464464
" b 3b\n" \

arch/arm/include/asm/word-at-a-time.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
7171
asm(
7272
"1: ldr %0, [%2]\n"
7373
"2:\n"
74-
" .pushsection .fixup,\"ax\"\n"
74+
" .pushsection .text.fixup,\"ax\"\n"
7575
" .align 2\n"
7676
"3: and %1, %2, #0x3\n"
7777
" bic %2, %2, #0x3\n"

arch/arm/kernel/entry-armv.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ ENDPROC(__und_usr)
545545
/*
546546
* The out of line fixup for the ldrt instructions above.
547547
*/
548-
.pushsection .fixup, "ax"
548+
.pushsection .text.fixup, "ax"
549549
.align 2
550550
4: str r4, [sp, #S_PC] @ retry current instruction
551551
ret r9

arch/arm/kernel/swp_emulate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
" cmp %0, #0\n" \
4343
" movne %0, %4\n" \
4444
"2:\n" \
45-
" .section .fixup,\"ax\"\n" \
45+
" .section .text.fixup,\"ax\"\n" \
4646
" .align 2\n" \
4747
"3: mov %0, %5\n" \
4848
" b 2b\n" \

arch/arm/kernel/vmlinux.lds.S

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ SECTIONS
7474
ARM_EXIT_DISCARD(EXIT_DATA)
7575
EXIT_CALL
7676
#ifndef CONFIG_MMU
77-
*(.fixup)
77+
*(.text.fixup)
7878
*(__ex_table)
7979
#endif
8080
#ifndef CONFIG_SMP_ON_UP
@@ -109,9 +109,6 @@ SECTIONS
109109
SCHED_TEXT
110110
LOCK_TEXT
111111
KPROBES_TEXT
112-
#ifdef CONFIG_MMU
113-
*(.fixup)
114-
#endif
115112
*(.gnu.warning)
116113
*(.glue_7)
117114
*(.glue_7t)

arch/arm/lib/clear_user.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ USER( strnebt r2, [r0])
4747
ENDPROC(__clear_user)
4848
ENDPROC(__clear_user_std)
4949

50-
.pushsection .fixup,"ax"
50+
.pushsection .text.fixup,"ax"
5151
.align 0
5252
9001: ldmfd sp!, {r0, pc}
5353
.popsection

arch/arm/lib/copy_to_user.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ WEAK(__copy_to_user)
100100
ENDPROC(__copy_to_user)
101101
ENDPROC(__copy_to_user_std)
102102

103-
.pushsection .fixup,"ax"
103+
.pushsection .text.fixup,"ax"
104104
.align 0
105105
copy_abort_preamble
106106
ldmfd sp!, {r1, r2, r3}

arch/arm/lib/csumpartialcopyuser.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
* so properly, we would have to add in whatever registers were loaded before
6969
* the fault, which, with the current asm above is not predictable.
7070
*/
71-
.pushsection .fixup,"ax"
71+
.pushsection .text.fixup,"ax"
7272
.align 4
7373
9001: mov r4, #-EFAULT
7474
ldr r5, [sp, #8*4] @ *err_ptr

arch/arm/mm/alignment.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ union offset_union {
201201
THUMB( "1: "ins" %1, [%2]\n" ) \
202202
THUMB( " add %2, %2, #1\n" ) \
203203
"2:\n" \
204-
" .pushsection .fixup,\"ax\"\n" \
204+
" .pushsection .text.fixup,\"ax\"\n" \
205205
" .align 2\n" \
206206
"3: mov %0, #1\n" \
207207
" b 2b\n" \
@@ -261,7 +261,7 @@ union offset_union {
261261
" mov %1, %1, "NEXT_BYTE"\n" \
262262
"2: "ins" %1, [%2]\n" \
263263
"3:\n" \
264-
" .pushsection .fixup,\"ax\"\n" \
264+
" .pushsection .text.fixup,\"ax\"\n" \
265265
" .align 2\n" \
266266
"4: mov %0, #1\n" \
267267
" b 3b\n" \
@@ -301,7 +301,7 @@ union offset_union {
301301
" mov %1, %1, "NEXT_BYTE"\n" \
302302
"4: "ins" %1, [%2]\n" \
303303
"5:\n" \
304-
" .pushsection .fixup,\"ax\"\n" \
304+
" .pushsection .text.fixup,\"ax\"\n" \
305305
" .align 2\n" \
306306
"6: mov %0, #1\n" \
307307
" b 5b\n" \

arch/arm/nwfpe/entry.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ next:
113113
@ to fault. Emit the appropriate exception gunk to fix things up.
114114
@ ??? For some reason, faults can happen at .Lx2 even with a
115115
@ plain LDR instruction. Weird, but it seems harmless.
116-
.pushsection .fixup,"ax"
116+
.pushsection .text.fixup,"ax"
117117
.align 2
118118
.Lfix: ret r9 @ let the user eat segfaults
119119
.popsection

0 commit comments

Comments
 (0)