summaryrefslogtreecommitdiffstats
path: root/lld/test/COFF/secrel-absolute.s
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/COFF/secrel-absolute.s')
-rw-r--r--lld/test/COFF/secrel-absolute.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/lld/test/COFF/secrel-absolute.s b/lld/test/COFF/secrel-absolute.s
new file mode 100644
index 00000000000..69b5ab92991
--- /dev/null
+++ b/lld/test/COFF/secrel-absolute.s
@@ -0,0 +1,14 @@
+# RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t.obj
+# RUN: not lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe 2>&1 | FileCheck %s
+
+# secrel relocations against absolute symbols are errors.
+
+# CHECK: SECREL relocation points to a non-regular symbol: __guard_fids_table
+
+.text
+.global main
+main:
+ret
+
+.section .rdata,"dr"
+.secrel32 __guard_fids_table
OpenPOWER on IntegriCloud