summaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/operators.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-24 01:00:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-24 01:00:50 +0000
commit0d9ba4fe26725cacc7253fc3c72c4574f26bc099 (patch)
tree90c426d54188ca226b29aaf8a308bba364a73d1a /test/ELF/linkerscript/operators.s
parenteb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (diff)
Notes
Diffstat (limited to 'test/ELF/linkerscript/operators.s')
-rw-r--r--test/ELF/linkerscript/operators.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/operators.s b/test/ELF/linkerscript/operators.s
index 868805b34c2e..494fc08c0f99 100644
--- a/test/ELF/linkerscript/operators.s
+++ b/test/ELF/linkerscript/operators.s
@@ -1,6 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { \
+# RUN: _start = .; \
# RUN: plus = 1 + 2 + 3; \
# RUN: minus = 5 - 1; \
# RUN: div = 6 / 2; \
@@ -26,6 +27,9 @@
# RUN: . = 0xfff0; \
# RUN: datasegmentalign = DATA_SEGMENT_ALIGN (0xffff, 0); \
# RUN: datasegmentalign2 = DATA_SEGMENT_ALIGN (0, 0); \
+# RUN: _end = .; \
+# RUN: minus_rel = _end - 0x10; \
+# RUN: minus_abs = _end - _start; \
# RUN: }" > %t.script
# RUN: ld.lld %t --script %t.script -o %t2
# RUN: llvm-objdump -t %t2 | FileCheck %s
@@ -53,6 +57,8 @@
# CHECK: 00000000001000 *ABS* 00000000 commonpagesize
# CHECK: 0000000000ffff *ABS* 00000000 datasegmentalign
# CHECK: 0000000000fff0 *ABS* 00000000 datasegmentalign2
+# CHECK: 0000000000ffe0 .text 00000000 minus_rel
+# CHECK: 0000000000fff0 *ABS* 00000000 minus_abs
## Mailformed number error.
# RUN: echo "SECTIONS { . = 0x12Q41; }" > %t.script