diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-04-19 05:15:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-04-21 03:45:21 -0400 |
commit | 4260415f6a3b92c5c986398d96c314df37a4ccbf (patch) | |
tree | 13db8d997677c70d7b3f880daafab41d0b6711f3 /arch/arm/kernel | |
parent | 05ce7bfe547c9fa967d9cab6c37867a9cb6fb3fa (diff) |
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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 10 | ||||
-rw-r--r-- | arch/arm/kernel/ftrace.c | 8 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 6c5cf369183b..e6a0fb0f392e 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -523,16 +523,16 @@ ENDPROC(__und_usr) | |||
523 | /* | 523 | /* |
524 | * The out of line fixup for the ldrt above. | 524 | * The out of line fixup for the ldrt above. |
525 | */ | 525 | */ |
526 | .section .fixup, "ax" | 526 | .pushsection .fixup, "ax" |
527 | 4: mov pc, r9 | 527 | 4: mov pc, r9 |
528 | .previous | 528 | .popsection |
529 | .section __ex_table,"a" | 529 | .pushsection __ex_table,"a" |
530 | .long 1b, 4b | 530 | .long 1b, 4b |
531 | #if __LINUX_ARM_ARCH__ >= 7 | 531 | #if __LINUX_ARM_ARCH__ >= 7 |
532 | .long 2b, 4b | 532 | .long 2b, 4b |
533 | .long 3b, 4b | 533 | .long 3b, 4b |
534 | #endif | 534 | #endif |
535 | .previous | 535 | .popsection |
536 | 536 | ||
537 | /* | 537 | /* |
538 | * Check whether the instruction is a co-processor instruction. | 538 | * Check whether the instruction is a co-processor instruction. |
@@ -679,7 +679,7 @@ do_fpe: | |||
679 | .data | 679 | .data |
680 | ENTRY(fp_enter) | 680 | ENTRY(fp_enter) |
681 | .word no_fp | 681 | .word no_fp |
682 | .previous | 682 | .text |
683 | 683 | ||
684 | ENTRY(no_fp) | 684 | ENTRY(no_fp) |
685 | mov pc, lr | 685 | mov pc, lr |
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index c63842766229..0298286ad4ad 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c | |||
@@ -62,15 +62,15 @@ int ftrace_modify_code(unsigned long pc, unsigned char *old_code, | |||
62 | " movne %0, #2 \n" | 62 | " movne %0, #2 \n" |
63 | "3:\n" | 63 | "3:\n" |
64 | 64 | ||
65 | ".section .fixup, \"ax\"\n" | 65 | ".pushsection .fixup, \"ax\"\n" |
66 | "4: mov %0, #1 \n" | 66 | "4: mov %0, #1 \n" |
67 | " b 3b \n" | 67 | " b 3b \n" |
68 | ".previous\n" | 68 | ".popsection\n" |
69 | 69 | ||
70 | ".section __ex_table, \"a\"\n" | 70 | ".pushsection __ex_table, \"a\"\n" |
71 | " .long 1b, 4b \n" | 71 | " .long 1b, 4b \n" |
72 | " .long 2b, 4b \n" | 72 | " .long 2b, 4b \n" |
73 | ".previous\n" | 73 | ".popsection\n" |
74 | 74 | ||
75 | : "=r"(err), "=r"(replaced) | 75 | : "=r"(err), "=r"(replaced) |
76 | : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced) | 76 | : "r"(pc), "r"(new), "r"(old), "0"(err), "1"(replaced) |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 0e12e0acbf26..acf5e6fdb6dc 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -355,7 +355,7 @@ EXPORT_SYMBOL(dump_fpu); | |||
355 | * the thread function, and r3 points to the exit function. | 355 | * the thread function, and r3 points to the exit function. |
356 | */ | 356 | */ |
357 | extern void kernel_thread_helper(void); | 357 | extern void kernel_thread_helper(void); |
358 | asm( ".section .text\n" | 358 | asm( ".pushsection .text\n" |
359 | " .align\n" | 359 | " .align\n" |
360 | " .type kernel_thread_helper, #function\n" | 360 | " .type kernel_thread_helper, #function\n" |
361 | "kernel_thread_helper:\n" | 361 | "kernel_thread_helper:\n" |
@@ -363,11 +363,11 @@ asm( ".section .text\n" | |||
363 | " mov lr, r3\n" | 363 | " mov lr, r3\n" |
364 | " mov pc, r2\n" | 364 | " mov pc, r2\n" |
365 | " .size kernel_thread_helper, . - kernel_thread_helper\n" | 365 | " .size kernel_thread_helper, . - kernel_thread_helper\n" |
366 | " .previous"); | 366 | " .popsection"); |
367 | 367 | ||
368 | #ifdef CONFIG_ARM_UNWIND | 368 | #ifdef CONFIG_ARM_UNWIND |
369 | extern void kernel_thread_exit(long code); | 369 | extern void kernel_thread_exit(long code); |
370 | asm( ".section .text\n" | 370 | asm( ".pushsection .text\n" |
371 | " .align\n" | 371 | " .align\n" |
372 | " .type kernel_thread_exit, #function\n" | 372 | " .type kernel_thread_exit, #function\n" |
373 | "kernel_thread_exit:\n" | 373 | "kernel_thread_exit:\n" |
@@ -377,7 +377,7 @@ asm( ".section .text\n" | |||
377 | " nop\n" | 377 | " nop\n" |
378 | " .fnend\n" | 378 | " .fnend\n" |
379 | " .size kernel_thread_exit, . - kernel_thread_exit\n" | 379 | " .size kernel_thread_exit, . - kernel_thread_exit\n" |
380 | " .previous"); | 380 | " .popsection"); |
381 | #else | 381 | #else |
382 | #define kernel_thread_exit do_exit | 382 | #define kernel_thread_exit do_exit |
383 | #endif | 383 | #endif |