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

James Clarke via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 18:30:20 PST 2020


Author: James Clarke
Date: 2020-01-23T02:30:10Z
New Revision: ddfe8751b16a1d57b0586fb48d1109c98234bc3f

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

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

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-commits mailing list