summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2020-01-23 02:30:10 +0000
committerHans Wennborg <hans@chromium.org>2020-01-23 18:27:38 +0100
commita3982a59ce34039f63fff35c6c0562cf6fd5c771 (patch)
treeed50e17374e21f036d6cbb546f15e3b88f69f81b /lld
parent8634a82910eba78279a69fcba0925d3a602a0563 (diff)
downloadbcm5719-llvm-a3982a59ce34039f63fff35c6c0562cf6fd5c771.tar.gz
bcm5719-llvm-a3982a59ce34039f63fff35c6c0562cf6fd5c771.zip
[test] Fix lld/test/ELF/riscv-pcrel-hilo-error.s after D73211
(cherry picked from commit ddfe8751b16a1d57b0586fb48d1109c98234bc3f)
Diffstat (limited to 'lld')
-rw-r--r--lld/test/ELF/riscv-pcrel-hilo-error.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/lld/test/ELF/riscv-pcrel-hilo-error.s b/lld/test/ELF/riscv-pcrel-hilo-error.s
index bfc205520bd..1557ac77bb7 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)
OpenPOWER on IntegriCloud