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/mm/alignment.c | |
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/mm/alignment.c')
-rw-r--r-- | arch/arm/mm/alignment.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index edddd66faac6..a2ab51fa73e2 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -166,15 +166,15 @@ union offset_union { | |||
166 | THUMB( "1: "ins" %1, [%2]\n" ) \ | 166 | THUMB( "1: "ins" %1, [%2]\n" ) \ |
167 | THUMB( " add %2, %2, #1\n" ) \ | 167 | THUMB( " add %2, %2, #1\n" ) \ |
168 | "2:\n" \ | 168 | "2:\n" \ |
169 | " .section .fixup,\"ax\"\n" \ | 169 | " .pushsection .fixup,\"ax\"\n" \ |
170 | " .align 2\n" \ | 170 | " .align 2\n" \ |
171 | "3: mov %0, #1\n" \ | 171 | "3: mov %0, #1\n" \ |
172 | " b 2b\n" \ | 172 | " b 2b\n" \ |
173 | " .previous\n" \ | 173 | " .popsection\n" \ |
174 | " .section __ex_table,\"a\"\n" \ | 174 | " .pushsection __ex_table,\"a\"\n" \ |
175 | " .align 3\n" \ | 175 | " .align 3\n" \ |
176 | " .long 1b, 3b\n" \ | 176 | " .long 1b, 3b\n" \ |
177 | " .previous\n" \ | 177 | " .popsection\n" \ |
178 | : "=r" (err), "=&r" (val), "=r" (addr) \ | 178 | : "=r" (err), "=&r" (val), "=r" (addr) \ |
179 | : "0" (err), "2" (addr)) | 179 | : "0" (err), "2" (addr)) |
180 | 180 | ||
@@ -226,16 +226,16 @@ union offset_union { | |||
226 | " mov %1, %1, "NEXT_BYTE"\n" \ | 226 | " mov %1, %1, "NEXT_BYTE"\n" \ |
227 | "2: "ins" %1, [%2]\n" \ | 227 | "2: "ins" %1, [%2]\n" \ |
228 | "3:\n" \ | 228 | "3:\n" \ |
229 | " .section .fixup,\"ax\"\n" \ | 229 | " .pushsection .fixup,\"ax\"\n" \ |
230 | " .align 2\n" \ | 230 | " .align 2\n" \ |
231 | "4: mov %0, #1\n" \ | 231 | "4: mov %0, #1\n" \ |
232 | " b 3b\n" \ | 232 | " b 3b\n" \ |
233 | " .previous\n" \ | 233 | " .popsection\n" \ |
234 | " .section __ex_table,\"a\"\n" \ | 234 | " .pushsection __ex_table,\"a\"\n" \ |
235 | " .align 3\n" \ | 235 | " .align 3\n" \ |
236 | " .long 1b, 4b\n" \ | 236 | " .long 1b, 4b\n" \ |
237 | " .long 2b, 4b\n" \ | 237 | " .long 2b, 4b\n" \ |
238 | " .previous\n" \ | 238 | " .popsection\n" \ |
239 | : "=r" (err), "=&r" (v), "=&r" (a) \ | 239 | : "=r" (err), "=&r" (v), "=&r" (a) \ |
240 | : "0" (err), "1" (v), "2" (a)); \ | 240 | : "0" (err), "1" (v), "2" (a)); \ |
241 | if (err) \ | 241 | if (err) \ |
@@ -266,18 +266,18 @@ union offset_union { | |||
266 | " mov %1, %1, "NEXT_BYTE"\n" \ | 266 | " mov %1, %1, "NEXT_BYTE"\n" \ |
267 | "4: "ins" %1, [%2]\n" \ | 267 | "4: "ins" %1, [%2]\n" \ |
268 | "5:\n" \ | 268 | "5:\n" \ |
269 | " .section .fixup,\"ax\"\n" \ | 269 | " .pushsection .fixup,\"ax\"\n" \ |
270 | " .align 2\n" \ | 270 | " .align 2\n" \ |
271 | "6: mov %0, #1\n" \ | 271 | "6: mov %0, #1\n" \ |
272 | " b 5b\n" \ | 272 | " b 5b\n" \ |
273 | " .previous\n" \ | 273 | " .popsection\n" \ |
274 | " .section __ex_table,\"a\"\n" \ | 274 | " .pushsection __ex_table,\"a\"\n" \ |
275 | " .align 3\n" \ | 275 | " .align 3\n" \ |
276 | " .long 1b, 6b\n" \ | 276 | " .long 1b, 6b\n" \ |
277 | " .long 2b, 6b\n" \ | 277 | " .long 2b, 6b\n" \ |
278 | " .long 3b, 6b\n" \ | 278 | " .long 3b, 6b\n" \ |
279 | " .long 4b, 6b\n" \ | 279 | " .long 4b, 6b\n" \ |
280 | " .previous\n" \ | 280 | " .popsection\n" \ |
281 | : "=r" (err), "=&r" (v), "=&r" (a) \ | 281 | : "=r" (err), "=&r" (v), "=&r" (a) \ |
282 | : "0" (err), "1" (v), "2" (a)); \ | 282 | : "0" (err), "1" (v), "2" (a)); \ |
283 | if (err) \ | 283 | if (err) \ |