RISC-V: Stop using LOCAL for the uaccess fixups
authorPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 27 Feb 2020 19:16:28 +0000 (11:16 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 3 Mar 2020 18:45:14 +0000 (10:45 -0800)
LLVM's integrated assembler doesn't support the LOCAL directive, which we're
using when generating our uaccess fixup tables.  Luckily the table fragment is
small enough that there's only one internal symbol, so using a relative symbol
reference doesn't really complicate anything.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/lib/uaccess.S

index f29d2ba..fceaeb1 100644 (file)
@@ -3,14 +3,12 @@
 #include <asm/asm.h>
 #include <asm/csr.h>
 
-       .altmacro
        .macro fixup op reg addr lbl
-       LOCAL _epc
-_epc:
+100:
        \op \reg, \addr
        .section __ex_table,"a"
        .balign RISCV_SZPTR
-       RISCV_PTR _epc, \lbl
+       RISCV_PTR 100b, \lbl
        .previous
        .endm