diff options
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 28 | ||||
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 17 |
2 files changed, 27 insertions, 18 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 79a41fa978f5..7e1ae91e5b1a 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -993,7 +993,7 @@ ENDPROC(vector_\name) | |||
993 | 1: | 993 | 1: |
994 | .endm | 994 | .endm |
995 | 995 | ||
996 | .globl __stubs_start | 996 | .section .stubs, "ax", %progbits |
997 | __stubs_start: | 997 | __stubs_start: |
998 | @ This must be the first word | 998 | @ This must be the first word |
999 | .word vector_swi | 999 | .word vector_swi |
@@ -1120,24 +1120,16 @@ vector_addrexcptn: | |||
1120 | vector_fiq: | 1120 | vector_fiq: |
1121 | subs pc, lr, #4 | 1121 | subs pc, lr, #4 |
1122 | 1122 | ||
1123 | .globl __stubs_end | 1123 | .section .vectors, "ax", %progbits |
1124 | __stubs_end: | ||
1125 | |||
1126 | .equ stubs_offset, __vectors_start + 0x1000 - __stubs_start | ||
1127 | |||
1128 | .globl __vectors_start | ||
1129 | __vectors_start: | 1124 | __vectors_start: |
1130 | W(b) vector_rst + stubs_offset | 1125 | W(b) vector_rst |
1131 | W(b) vector_und + stubs_offset | 1126 | W(b) vector_und |
1132 | W(ldr) pc, .LCvswi + stubs_offset | 1127 | W(ldr) pc, __vectors_start + 0x1000 |
1133 | W(b) vector_pabt + stubs_offset | 1128 | W(b) vector_pabt |
1134 | W(b) vector_dabt + stubs_offset | 1129 | W(b) vector_dabt |
1135 | W(b) vector_addrexcptn + stubs_offset | 1130 | W(b) vector_addrexcptn |
1136 | W(b) vector_irq + stubs_offset | 1131 | W(b) vector_irq |
1137 | W(b) vector_fiq + stubs_offset | 1132 | W(b) vector_fiq |
1138 | |||
1139 | .globl __vectors_end | ||
1140 | __vectors_end: | ||
1141 | 1133 | ||
1142 | .data | 1134 | .data |
1143 | 1135 | ||
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index fa25e4e425f6..7bcee5c9b604 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -148,6 +148,23 @@ SECTIONS | |||
148 | . = ALIGN(PAGE_SIZE); | 148 | . = ALIGN(PAGE_SIZE); |
149 | __init_begin = .; | 149 | __init_begin = .; |
150 | #endif | 150 | #endif |
151 | /* | ||
152 | * The vectors and stubs are relocatable code, and the | ||
153 | * only thing that matters is their relative offsets | ||
154 | */ | ||
155 | __vectors_start = .; | ||
156 | .vectors 0 : AT(__vectors_start) { | ||
157 | *(.vectors) | ||
158 | } | ||
159 | . = __vectors_start + SIZEOF(.vectors); | ||
160 | __vectors_end = .; | ||
161 | |||
162 | __stubs_start = .; | ||
163 | .stubs 0x1000 : AT(__stubs_start) { | ||
164 | *(.stubs) | ||
165 | } | ||
166 | . = __stubs_start + SIZEOF(.stubs); | ||
167 | __stubs_end = .; | ||
151 | 168 | ||
152 | INIT_TEXT_SECTION(8) | 169 | INIT_TEXT_SECTION(8) |
153 | .exit.text : { | 170 | .exit.text : { |