Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: fix build error in arch/arm/kernel/process.c

/tmp/ccJ3ssZW.s: Assembler messages:
/tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'

This is caused because:

.section .data
.section .text
.section .text
.previous

does not return us to the .text section, but the .data section; this
makes use of .previous dangerous if the ordering of previous sections
is not known.

Fix up the other users of .previous; .pushsection and .popsection are
a safer pairing to use than .section and .previous.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+86 -86
+6 -6
arch/arm/include/asm/assembler.h
··· 149 150 #define USER(x...) \ 151 9999: x; \ 152 - .section __ex_table,"a"; \ 153 .align 3; \ 154 .long 9999b,9001f; \ 155 - .previous 156 157 /* 158 * SMP data memory barrier ··· 193 .error "Unsupported inc macro argument" 194 .endif 195 196 - .section __ex_table,"a" 197 .align 3 198 .long 9999b, \abort 199 - .previous 200 .endm 201 202 .macro usracc, instr, reg, ptr, inc, cond, rept, abort ··· 234 .error "Unsupported inc macro argument" 235 .endif 236 237 - .section __ex_table,"a" 238 .align 3 239 .long 9999b, \abort 240 - .previous 241 .endr 242 .endm 243
··· 149 150 #define USER(x...) \ 151 9999: x; \ 152 + .pushsection __ex_table,"a"; \ 153 .align 3; \ 154 .long 9999b,9001f; \ 155 + .popsection 156 157 /* 158 * SMP data memory barrier ··· 193 .error "Unsupported inc macro argument" 194 .endif 195 196 + .pushsection __ex_table,"a" 197 .align 3 198 .long 9999b, \abort 199 + .popsection 200 .endm 201 202 .macro usracc, instr, reg, ptr, inc, cond, rept, abort ··· 234 .error "Unsupported inc macro argument" 235 .endif 236 237 + .pushsection __ex_table,"a" 238 .align 3 239 .long 9999b, \abort 240 + .popsection 241 .endr 242 .endm 243
+8 -8
arch/arm/include/asm/futex.h
··· 21 "2: strt %0, [%2]\n" \ 22 " mov %0, #0\n" \ 23 "3:\n" \ 24 - " .section __ex_table,\"a\"\n" \ 25 " .align 3\n" \ 26 " .long 1b, 4f, 2b, 4f\n" \ 27 - " .previous\n" \ 28 - " .section .fixup,\"ax\"\n" \ 29 "4: mov %0, %4\n" \ 30 " b 3b\n" \ 31 - " .previous" \ 32 : "=&r" (ret), "=&r" (oldval) \ 33 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 34 : "cc", "memory") ··· 102 " it eq @ explicit IT needed for the 2b label\n" 103 "2: streqt %2, [%3]\n" 104 "3:\n" 105 - " .section __ex_table,\"a\"\n" 106 " .align 3\n" 107 " .long 1b, 4f, 2b, 4f\n" 108 - " .previous\n" 109 - " .section .fixup,\"ax\"\n" 110 "4: mov %0, %4\n" 111 " b 3b\n" 112 - " .previous" 113 : "=&r" (val) 114 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 115 : "cc", "memory");
··· 21 "2: strt %0, [%2]\n" \ 22 " mov %0, #0\n" \ 23 "3:\n" \ 24 + " .pushsection __ex_table,\"a\"\n" \ 25 " .align 3\n" \ 26 " .long 1b, 4f, 2b, 4f\n" \ 27 + " .popsection\n" \ 28 + " .pushsection .fixup,\"ax\"\n" \ 29 "4: mov %0, %4\n" \ 30 " b 3b\n" \ 31 + " .popsection" \ 32 : "=&r" (ret), "=&r" (oldval) \ 33 : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 34 : "cc", "memory") ··· 102 " it eq @ explicit IT needed for the 2b label\n" 103 "2: streqt %2, [%3]\n" 104 "3:\n" 105 + " .pushsection __ex_table,\"a\"\n" 106 " .align 3\n" 107 " .long 1b, 4f, 2b, 4f\n" 108 + " .popsection\n" 109 + " .pushsection .fixup,\"ax\"\n" 110 "4: mov %0, %4\n" 111 " b 3b\n" 112 + " .popsection" 113 : "=&r" (val) 114 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 115 : "cc", "memory");
+20 -20
arch/arm/include/asm/uaccess.h
··· 229 __asm__ __volatile__( \ 230 "1: ldrbt %1,[%2]\n" \ 231 "2:\n" \ 232 - " .section .fixup,\"ax\"\n" \ 233 " .align 2\n" \ 234 "3: mov %0, %3\n" \ 235 " mov %1, #0\n" \ 236 " b 2b\n" \ 237 - " .previous\n" \ 238 - " .section __ex_table,\"a\"\n" \ 239 " .align 3\n" \ 240 " .long 1b, 3b\n" \ 241 - " .previous" \ 242 : "+r" (err), "=&r" (x) \ 243 : "r" (addr), "i" (-EFAULT) \ 244 : "cc") ··· 265 __asm__ __volatile__( \ 266 "1: ldrt %1,[%2]\n" \ 267 "2:\n" \ 268 - " .section .fixup,\"ax\"\n" \ 269 " .align 2\n" \ 270 "3: mov %0, %3\n" \ 271 " mov %1, #0\n" \ 272 " b 2b\n" \ 273 - " .previous\n" \ 274 - " .section __ex_table,\"a\"\n" \ 275 " .align 3\n" \ 276 " .long 1b, 3b\n" \ 277 - " .previous" \ 278 : "+r" (err), "=&r" (x) \ 279 : "r" (addr), "i" (-EFAULT) \ 280 : "cc") ··· 310 __asm__ __volatile__( \ 311 "1: strbt %1,[%2]\n" \ 312 "2:\n" \ 313 - " .section .fixup,\"ax\"\n" \ 314 " .align 2\n" \ 315 "3: mov %0, %3\n" \ 316 " b 2b\n" \ 317 - " .previous\n" \ 318 - " .section __ex_table,\"a\"\n" \ 319 " .align 3\n" \ 320 " .long 1b, 3b\n" \ 321 - " .previous" \ 322 : "+r" (err) \ 323 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 324 : "cc") ··· 343 __asm__ __volatile__( \ 344 "1: strt %1,[%2]\n" \ 345 "2:\n" \ 346 - " .section .fixup,\"ax\"\n" \ 347 " .align 2\n" \ 348 "3: mov %0, %3\n" \ 349 " b 2b\n" \ 350 - " .previous\n" \ 351 - " .section __ex_table,\"a\"\n" \ 352 " .align 3\n" \ 353 " .long 1b, 3b\n" \ 354 - " .previous" \ 355 : "+r" (err) \ 356 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 357 : "cc") ··· 371 THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \ 372 THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \ 373 "3:\n" \ 374 - " .section .fixup,\"ax\"\n" \ 375 " .align 2\n" \ 376 "4: mov %0, %3\n" \ 377 " b 3b\n" \ 378 - " .previous\n" \ 379 - " .section __ex_table,\"a\"\n" \ 380 " .align 3\n" \ 381 " .long 1b, 4b\n" \ 382 " .long 2b, 4b\n" \ 383 - " .previous" \ 384 : "+r" (err), "+r" (__pu_addr) \ 385 : "r" (x), "i" (-EFAULT) \ 386 : "cc")
··· 229 __asm__ __volatile__( \ 230 "1: ldrbt %1,[%2]\n" \ 231 "2:\n" \ 232 + " .pushsection .fixup,\"ax\"\n" \ 233 " .align 2\n" \ 234 "3: mov %0, %3\n" \ 235 " mov %1, #0\n" \ 236 " b 2b\n" \ 237 + " .popsection\n" \ 238 + " .pushsection __ex_table,\"a\"\n" \ 239 " .align 3\n" \ 240 " .long 1b, 3b\n" \ 241 + " .popsection" \ 242 : "+r" (err), "=&r" (x) \ 243 : "r" (addr), "i" (-EFAULT) \ 244 : "cc") ··· 265 __asm__ __volatile__( \ 266 "1: ldrt %1,[%2]\n" \ 267 "2:\n" \ 268 + " .pushsection .fixup,\"ax\"\n" \ 269 " .align 2\n" \ 270 "3: mov %0, %3\n" \ 271 " mov %1, #0\n" \ 272 " b 2b\n" \ 273 + " .popsection\n" \ 274 + " .pushsection __ex_table,\"a\"\n" \ 275 " .align 3\n" \ 276 " .long 1b, 3b\n" \ 277 + " .popsection" \ 278 : "+r" (err), "=&r" (x) \ 279 : "r" (addr), "i" (-EFAULT) \ 280 : "cc") ··· 310 __asm__ __volatile__( \ 311 "1: strbt %1,[%2]\n" \ 312 "2:\n" \ 313 + " .pushsection .fixup,\"ax\"\n" \ 314 " .align 2\n" \ 315 "3: mov %0, %3\n" \ 316 " b 2b\n" \ 317 + " .popsection\n" \ 318 + " .pushsection __ex_table,\"a\"\n" \ 319 " .align 3\n" \ 320 " .long 1b, 3b\n" \ 321 + " .popsection" \ 322 : "+r" (err) \ 323 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 324 : "cc") ··· 343 __asm__ __volatile__( \ 344 "1: strt %1,[%2]\n" \ 345 "2:\n" \ 346 + " .pushsection .fixup,\"ax\"\n" \ 347 " .align 2\n" \ 348 "3: mov %0, %3\n" \ 349 " b 2b\n" \ 350 + " .popsection\n" \ 351 + " .pushsection __ex_table,\"a\"\n" \ 352 " .align 3\n" \ 353 " .long 1b, 3b\n" \ 354 + " .popsection" \ 355 : "+r" (err) \ 356 : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \ 357 : "cc") ··· 371 THUMB( "1: strt " __reg_oper1 ", [%1]\n" ) \ 372 THUMB( "2: strt " __reg_oper0 ", [%1, #4]\n" ) \ 373 "3:\n" \ 374 + " .pushsection .fixup,\"ax\"\n" \ 375 " .align 2\n" \ 376 "4: mov %0, %3\n" \ 377 " b 3b\n" \ 378 + " .popsection\n" \ 379 + " .pushsection __ex_table,\"a\"\n" \ 380 " .align 3\n" \ 381 " .long 1b, 4b\n" \ 382 " .long 2b, 4b\n" \ 383 + " .popsection" \ 384 : "+r" (err), "+r" (__pu_addr) \ 385 : "r" (x), "i" (-EFAULT) \ 386 : "cc")
+5 -5
arch/arm/kernel/entry-armv.S
··· 523 /* 524 * The out of line fixup for the ldrt above. 525 */ 526 - .section .fixup, "ax" 527 4: mov pc, r9 528 - .previous 529 - .section __ex_table,"a" 530 .long 1b, 4b 531 #if __LINUX_ARM_ARCH__ >= 7 532 .long 2b, 4b 533 .long 3b, 4b 534 #endif 535 - .previous 536 537 /* 538 * Check whether the instruction is a co-processor instruction. ··· 679 .data 680 ENTRY(fp_enter) 681 .word no_fp 682 - .previous 683 684 ENTRY(no_fp) 685 mov pc, lr
··· 523 /* 524 * The out of line fixup for the ldrt above. 525 */ 526 + .pushsection .fixup, "ax" 527 4: mov pc, r9 528 + .popsection 529 + .pushsection __ex_table,"a" 530 .long 1b, 4b 531 #if __LINUX_ARM_ARCH__ >= 7 532 .long 2b, 4b 533 .long 3b, 4b 534 #endif 535 + .popsection 536 537 /* 538 * Check whether the instruction is a co-processor instruction. ··· 679 .data 680 ENTRY(fp_enter) 681 .word no_fp 682 + .text 683 684 ENTRY(no_fp) 685 mov pc, lr
+4 -4
arch/arm/kernel/ftrace.c
··· 62 " movne %0, #2 \n" 63 "3:\n" 64 65 - ".section .fixup, \"ax\"\n" 66 "4: mov %0, #1 \n" 67 " b 3b \n" 68 - ".previous\n" 69 70 - ".section __ex_table, \"a\"\n" 71 " .long 1b, 4b \n" 72 " .long 2b, 4b \n" 73 - ".previous\n" 74 75 : "=r"(err), "=r"(replaced) 76 : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced)
··· 62 " movne %0, #2 \n" 63 "3:\n" 64 65 + ".pushsection .fixup, \"ax\"\n" 66 "4: mov %0, #1 \n" 67 " b 3b \n" 68 + ".popsection\n" 69 70 + ".pushsection __ex_table, \"a\"\n" 71 " .long 1b, 4b \n" 72 " .long 2b, 4b \n" 73 + ".popsection\n" 74 75 : "=r"(err), "=r"(replaced) 76 : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced)
+4 -4
arch/arm/kernel/process.c
··· 355 * the thread function, and r3 points to the exit function. 356 */ 357 extern void kernel_thread_helper(void); 358 - asm( ".section .text\n" 359 " .align\n" 360 " .type kernel_thread_helper, #function\n" 361 "kernel_thread_helper:\n" ··· 363 " mov lr, r3\n" 364 " mov pc, r2\n" 365 " .size kernel_thread_helper, . - kernel_thread_helper\n" 366 - " .previous"); 367 368 #ifdef CONFIG_ARM_UNWIND 369 extern void kernel_thread_exit(long code); 370 - asm( ".section .text\n" 371 " .align\n" 372 " .type kernel_thread_exit, #function\n" 373 "kernel_thread_exit:\n" ··· 377 " nop\n" 378 " .fnend\n" 379 " .size kernel_thread_exit, . - kernel_thread_exit\n" 380 - " .previous"); 381 #else 382 #define kernel_thread_exit do_exit 383 #endif
··· 355 * the thread function, and r3 points to the exit function. 356 */ 357 extern void kernel_thread_helper(void); 358 + asm( ".pushsection .text\n" 359 " .align\n" 360 " .type kernel_thread_helper, #function\n" 361 "kernel_thread_helper:\n" ··· 363 " mov lr, r3\n" 364 " mov pc, r2\n" 365 " .size kernel_thread_helper, . - kernel_thread_helper\n" 366 + " .popsection"); 367 368 #ifdef CONFIG_ARM_UNWIND 369 extern void kernel_thread_exit(long code); 370 + asm( ".pushsection .text\n" 371 " .align\n" 372 " .type kernel_thread_exit, #function\n" 373 "kernel_thread_exit:\n" ··· 377 " nop\n" 378 " .fnend\n" 379 " .size kernel_thread_exit, . - kernel_thread_exit\n" 380 + " .popsection"); 381 #else 382 #define kernel_thread_exit do_exit 383 #endif
+2 -2
arch/arm/lib/backtrace.S
··· 110 ENDPROC(__backtrace) 111 ENDPROC(c_backtrace) 112 113 - .section __ex_table,"a" 114 .align 3 115 .long 1001b, 1006b 116 .long 1002b, 1006b 117 .long 1003b, 1006b 118 .long 1004b, 1006b 119 - .previous 120 121 #define instr r4 122 #define reg r5
··· 110 ENDPROC(__backtrace) 111 ENDPROC(c_backtrace) 112 113 + .pushsection __ex_table,"a" 114 .align 3 115 .long 1001b, 1006b 116 .long 1002b, 1006b 117 .long 1003b, 1006b 118 .long 1004b, 1006b 119 + .popsection 120 121 #define instr r4 122 #define reg r5
+2 -2
arch/arm/lib/clear_user.S
··· 46 ldmfd sp!, {r1, pc} 47 ENDPROC(__clear_user) 48 49 - .section .fixup,"ax" 50 .align 0 51 9001: ldmfd sp!, {r0, pc} 52 - .previous 53
··· 46 ldmfd sp!, {r1, pc} 47 ENDPROC(__clear_user) 48 49 + .pushsection .fixup,"ax" 50 .align 0 51 9001: ldmfd sp!, {r0, pc} 52 + .popsection 53
+2 -2
arch/arm/lib/copy_from_user.S
··· 90 91 ENDPROC(__copy_from_user) 92 93 - .section .fixup,"ax" 94 .align 0 95 copy_abort_preamble 96 ldmfd sp!, {r1, r2} ··· 100 bl __memzero 101 ldr r0, [sp], #4 102 copy_abort_end 103 - .previous 104
··· 90 91 ENDPROC(__copy_from_user) 92 93 + .pushsection .fixup,"ax" 94 .align 0 95 copy_abort_preamble 96 ldmfd sp!, {r1, r2} ··· 100 bl __memzero 101 ldr r0, [sp], #4 102 copy_abort_end 103 + .popsection 104
+2 -2
arch/arm/lib/copy_to_user.S
··· 94 95 ENDPROC(__copy_to_user) 96 97 - .section .fixup,"ax" 98 .align 0 99 copy_abort_preamble 100 ldmfd sp!, {r1, r2, r3} 101 sub r0, r0, r1 102 rsb r0, r0, r2 103 copy_abort_end 104 - .previous 105
··· 94 95 ENDPROC(__copy_to_user) 96 97 + .pushsection .fixup,"ax" 98 .align 0 99 copy_abort_preamble 100 ldmfd sp!, {r1, r2, r3} 101 sub r0, r0, r1 102 rsb r0, r0, r2 103 copy_abort_end 104 + .popsection 105
+2 -2
arch/arm/lib/csumpartialcopyuser.S
··· 68 * so properly, we would have to add in whatever registers were loaded before 69 * the fault, which, with the current asm above is not predictable. 70 */ 71 - .section .fixup,"ax" 72 .align 4 73 9001: mov r4, #-EFAULT 74 ldr r5, [fp, #4] @ *err_ptr ··· 80 strneb r0, [r1], #1 81 bne 9002b 82 load_regs 83 - .previous
··· 68 * so properly, we would have to add in whatever registers were loaded before 69 * the fault, which, with the current asm above is not predictable. 70 */ 71 + .pushsection .fixup,"ax" 72 .align 4 73 9001: mov r4, #-EFAULT 74 ldr r5, [fp, #4] @ *err_ptr ··· 80 strneb r0, [r1], #1 81 bne 9002b 82 load_regs 83 + .popsection
+2 -2
arch/arm/lib/getuser.S
··· 64 mov pc, lr 65 ENDPROC(__get_user_bad) 66 67 - .section __ex_table, "a" 68 .long 1b, __get_user_bad 69 .long 2b, __get_user_bad 70 .long 3b, __get_user_bad 71 .long 4b, __get_user_bad 72 - .previous
··· 64 mov pc, lr 65 ENDPROC(__get_user_bad) 66 67 + .pushsection __ex_table, "a" 68 .long 1b, __get_user_bad 69 .long 2b, __get_user_bad 70 .long 3b, __get_user_bad 71 .long 4b, __get_user_bad 72 + .popsection
+2 -2
arch/arm/lib/putuser.S
··· 81 mov pc, lr 82 ENDPROC(__put_user_bad) 83 84 - .section __ex_table, "a" 85 .long 1b, __put_user_bad 86 .long 2b, __put_user_bad 87 .long 3b, __put_user_bad 88 .long 4b, __put_user_bad 89 .long 5b, __put_user_bad 90 .long 6b, __put_user_bad 91 - .previous
··· 81 mov pc, lr 82 ENDPROC(__put_user_bad) 83 84 + .pushsection __ex_table, "a" 85 .long 1b, __put_user_bad 86 .long 2b, __put_user_bad 87 .long 3b, __put_user_bad 88 .long 4b, __put_user_bad 89 .long 5b, __put_user_bad 90 .long 6b, __put_user_bad 91 + .popsection
+2 -2
arch/arm/lib/strncpy_from_user.S
··· 33 mov pc, lr 34 ENDPROC(__strncpy_from_user) 35 36 - .section .fixup,"ax" 37 .align 0 38 9001: mov r3, #0 39 strb r3, [r0, #0] @ null terminate 40 mov r0, #-EFAULT 41 mov pc, lr 42 - .previous 43
··· 33 mov pc, lr 34 ENDPROC(__strncpy_from_user) 35 36 + .pushsection .fixup,"ax" 37 .align 0 38 9001: mov r3, #0 39 strb r3, [r0, #0] @ null terminate 40 mov r0, #-EFAULT 41 mov pc, lr 42 + .popsection 43
+2 -2
arch/arm/lib/strnlen_user.S
··· 33 mov pc, lr 34 ENDPROC(__strnlen_user) 35 36 - .section .fixup,"ax" 37 .align 0 38 9001: mov r0, #0 39 mov pc, lr 40 - .previous
··· 33 mov pc, lr 34 ENDPROC(__strnlen_user) 35 36 + .pushsection .fixup,"ax" 37 .align 0 38 9001: mov r0, #0 39 mov pc, lr 40 + .popsection
+4 -4
arch/arm/lib/uaccess.S
··· 279 b .Lc2u_finished 280 ENDPROC(__copy_to_user) 281 282 - .section .fixup,"ax" 283 .align 0 284 9001: ldmfd sp!, {r0, r4 - r7, pc} 285 - .previous 286 287 /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); 288 * Purpose : copy a block from user memory to kernel memory ··· 545 b .Lcfu_finished 546 ENDPROC(__copy_from_user) 547 548 - .section .fixup,"ax" 549 .align 0 550 /* 551 * We took an exception. r0 contains a pointer to ··· 559 blne __memzero 560 mov r0, r4 561 ldmfd sp!, {r4 - r7, pc} 562 - .previous 563
··· 279 b .Lc2u_finished 280 ENDPROC(__copy_to_user) 281 282 + .pushsection .fixup,"ax" 283 .align 0 284 9001: ldmfd sp!, {r0, r4 - r7, pc} 285 + .popsection 286 287 /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); 288 * Purpose : copy a block from user memory to kernel memory ··· 545 b .Lcfu_finished 546 ENDPROC(__copy_from_user) 547 548 + .pushsection .fixup,"ax" 549 .align 0 550 /* 551 * We took an exception. r0 contains a pointer to ··· 559 blne __memzero 560 mov r0, r4 561 ldmfd sp!, {r4 - r7, pc} 562 + .popsection 563
+12 -12
arch/arm/mm/alignment.c
··· 166 THUMB( "1: "ins" %1, [%2]\n" ) \ 167 THUMB( " add %2, %2, #1\n" ) \ 168 "2:\n" \ 169 - " .section .fixup,\"ax\"\n" \ 170 " .align 2\n" \ 171 "3: mov %0, #1\n" \ 172 " b 2b\n" \ 173 - " .previous\n" \ 174 - " .section __ex_table,\"a\"\n" \ 175 " .align 3\n" \ 176 " .long 1b, 3b\n" \ 177 - " .previous\n" \ 178 : "=r" (err), "=&r" (val), "=r" (addr) \ 179 : "0" (err), "2" (addr)) 180 ··· 226 " mov %1, %1, "NEXT_BYTE"\n" \ 227 "2: "ins" %1, [%2]\n" \ 228 "3:\n" \ 229 - " .section .fixup,\"ax\"\n" \ 230 " .align 2\n" \ 231 "4: mov %0, #1\n" \ 232 " b 3b\n" \ 233 - " .previous\n" \ 234 - " .section __ex_table,\"a\"\n" \ 235 " .align 3\n" \ 236 " .long 1b, 4b\n" \ 237 " .long 2b, 4b\n" \ 238 - " .previous\n" \ 239 : "=r" (err), "=&r" (v), "=&r" (a) \ 240 : "0" (err), "1" (v), "2" (a)); \ 241 if (err) \ ··· 266 " mov %1, %1, "NEXT_BYTE"\n" \ 267 "4: "ins" %1, [%2]\n" \ 268 "5:\n" \ 269 - " .section .fixup,\"ax\"\n" \ 270 " .align 2\n" \ 271 "6: mov %0, #1\n" \ 272 " b 5b\n" \ 273 - " .previous\n" \ 274 - " .section __ex_table,\"a\"\n" \ 275 " .align 3\n" \ 276 " .long 1b, 6b\n" \ 277 " .long 2b, 6b\n" \ 278 " .long 3b, 6b\n" \ 279 " .long 4b, 6b\n" \ 280 - " .previous\n" \ 281 : "=r" (err), "=&r" (v), "=&r" (a) \ 282 : "0" (err), "1" (v), "2" (a)); \ 283 if (err) \
··· 166 THUMB( "1: "ins" %1, [%2]\n" ) \ 167 THUMB( " add %2, %2, #1\n" ) \ 168 "2:\n" \ 169 + " .pushsection .fixup,\"ax\"\n" \ 170 " .align 2\n" \ 171 "3: mov %0, #1\n" \ 172 " b 2b\n" \ 173 + " .popsection\n" \ 174 + " .pushsection __ex_table,\"a\"\n" \ 175 " .align 3\n" \ 176 " .long 1b, 3b\n" \ 177 + " .popsection\n" \ 178 : "=r" (err), "=&r" (val), "=r" (addr) \ 179 : "0" (err), "2" (addr)) 180 ··· 226 " mov %1, %1, "NEXT_BYTE"\n" \ 227 "2: "ins" %1, [%2]\n" \ 228 "3:\n" \ 229 + " .pushsection .fixup,\"ax\"\n" \ 230 " .align 2\n" \ 231 "4: mov %0, #1\n" \ 232 " b 3b\n" \ 233 + " .popsection\n" \ 234 + " .pushsection __ex_table,\"a\"\n" \ 235 " .align 3\n" \ 236 " .long 1b, 4b\n" \ 237 " .long 2b, 4b\n" \ 238 + " .popsection\n" \ 239 : "=r" (err), "=&r" (v), "=&r" (a) \ 240 : "0" (err), "1" (v), "2" (a)); \ 241 if (err) \ ··· 266 " mov %1, %1, "NEXT_BYTE"\n" \ 267 "4: "ins" %1, [%2]\n" \ 268 "5:\n" \ 269 + " .pushsection .fixup,\"ax\"\n" \ 270 " .align 2\n" \ 271 "6: mov %0, #1\n" \ 272 " b 5b\n" \ 273 + " .popsection\n" \ 274 + " .pushsection __ex_table,\"a\"\n" \ 275 " .align 3\n" \ 276 " .long 1b, 6b\n" \ 277 " .long 2b, 6b\n" \ 278 " .long 3b, 6b\n" \ 279 " .long 4b, 6b\n" \ 280 + " .popsection\n" \ 281 : "=r" (err), "=&r" (v), "=&r" (a) \ 282 : "0" (err), "1" (v), "2" (a)); \ 283 if (err) \
+1 -1
arch/arm/mm/proc-sa1100.S
··· 45 mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland 46 mov pc, lr 47 48 - .previous 49 50 /* 51 * cpu_sa1100_proc_fin()
··· 45 mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland 46 mov pc, lr 47 48 + .section .text 49 50 /* 51 * cpu_sa1100_proc_fin()
+4 -4
arch/arm/nwfpe/entry.S
··· 111 @ to fault. Emit the appropriate exception gunk to fix things up. 112 @ ??? For some reason, faults can happen at .Lx2 even with a 113 @ plain LDR instruction. Weird, but it seems harmless. 114 - .section .fixup,"ax" 115 .align 2 116 .Lfix: mov pc, r9 @ let the user eat segfaults 117 - .previous 118 119 - .section __ex_table,"a" 120 .align 3 121 .long .Lx1, .Lfix 122 - .previous
··· 111 @ to fault. Emit the appropriate exception gunk to fix things up. 112 @ ??? For some reason, faults can happen at .Lx2 even with a 113 @ plain LDR instruction. Weird, but it seems harmless. 114 + .pushsection .fixup,"ax" 115 .align 2 116 .Lfix: mov pc, r9 @ let the user eat segfaults 117 + .popsection 118 119 + .pushsection __ex_table,"a" 120 .align 3 121 .long .Lx1, .Lfix 122 + .popsection