summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/r2300_switch.S
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-11-07 11:14:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2017-01-03 16:34:49 +0100
commit08889582b8aa0bbc01a1e5a0033b9f98d2e11caa (patch)
treed4fdb756bd2022011c575a390bcb30b461c005ff /arch/mips/kernel/r2300_switch.S
parent2c0e57eaef3c2b233e42faf4e9db18ee8fd37734 (diff)
MIPS: End asm function prologue macros with .insn
When building a kernel targeting a microMIPS ISA, recent GNU linkers will fail the link if they cannot determine that the target of a branch or jump is microMIPS code, with errors such as the following: mips-img-linux-gnu-ld: arch/mips/built-in.o: .text+0x542c: Unsupported jump between ISA modes; consider recompiling with interlinking enabled. mips-img-linux-gnu-ld: final link failed: Bad value or: ./arch/mips/include/asm/uaccess.h:1017: warning: JALX to a non-word-aligned address Placing anything other than an instruction at the start of a function written in assembly appears to trigger such errors. In order to prepare for allowing us to follow function prologue macros with an EXPORT_SYMBOL invocation, end the prologue macros (LEAD, NESTED & FEXPORT) with a .insn directive. This ensures that the start of the function is marked as code, which always makes sense for functions & safely prevents us from hitting the link errors described above. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14508/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/r2300_switch.S')
0 files changed, 0 insertions, 0 deletions