[llvm-branch-commits] [lld] a3982a5 - [test] Fix lld/test/ELF/riscv-pcrel-hilo-error.s after D73211

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 23 09:29:54 PST 2020


Author: James Clarke
Date: 2020-01-23T18:27:38+01:00
New Revision: a3982a59ce34039f63fff35c6c0562cf6fd5c771

URL: https://github.com/llvm/llvm-project/commit/a3982a59ce34039f63fff35c6c0562cf6fd5c771
DIFF: https://github.com/llvm/llvm-project/commit/a3982a59ce34039f63fff35c6c0562cf6fd5c771.diff

LOG: [test] Fix lld/test/ELF/riscv-pcrel-hilo-error.s after D73211

(cherry picked from commit ddfe8751b16a1d57b0586fb48d1109c98234bc3f)

Added: 
    

Modified: 
    lld/test/ELF/riscv-pcrel-hilo-error.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/riscv-pcrel-hilo-error.s b/lld/test/ELF/riscv-pcrel-hilo-error.s
index bfc205520bd8..1557ac77bb7e 100644
--- a/lld/test/ELF/riscv-pcrel-hilo-error.s
+++ b/lld/test/ELF/riscv-pcrel-hilo-error.s
@@ -4,4 +4,10 @@
 
 # CHECK: error: R_RISCV_PCREL_LO12 relocation points to an absolute symbol: external
 
+# We provide a dummy %pcrel_hi referred to by external to appease the
+# assembler, but make external weak so --defsym can still override it at link
+# time.
+.weak external
+external:
+auipc sp,%pcrel_hi(external)
 addi sp,sp,%pcrel_lo(external)


        


More information about the llvm-branch-commits mailing list