2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: ld.lld -o %t %t.o --defsym=foo2=etext
4 # RUN: llvm-readobj --symbols -S %t | FileCheck %s
6 ## Check 'foo2' value is equal to value of 'etext'.
9 # CHECK-NEXT: Value: 0x[[VAL:.*]]
12 # CHECK-NEXT: Value: 0x[[VAL]]
14 ## Check 'foo2' value set correctly when using
15 ## reserved symbol 'etext' in expression.
16 # RUN: ld.lld -o %t %t.o --defsym=foo2=etext+2
17 # RUN: llvm-readobj --symbols -S %t | FileCheck %s --check-prefix=EXPR
20 # EXPR-NEXT: Value: 0x201127
23 # EXPR-NEXT: Value: 0x201125