2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3 # RUN: echo "SECTIONS { A = . - 0x10; B = A + 0x1; }" > %t.script
4 # RUN: ld.lld -shared %t1.o --script %t.script -o %t
5 # RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck %s --check-prefix=DUMP
6 # RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=SYMBOL
8 # B = A + 0x1 = -0x10 + 0x1 = -0xf -> 0xFFFFFFFFFFFFFFF1
9 # B - (0x94+6) = -0xf - (0x94+6) = -169
10 # DUMP: Disassembly of section .text:
13 # DUMP-NEXT: 94: {{.*}} -169(%rip), %eax
17 # SYMBOL-NEXT: Value: 0xFFFFFFFFFFFFFFF1
18 # SYMBOL-NEXT: Size: 0
19 # SYMBOL-NEXT: Binding: Local
20 # SYMBOL-NEXT: Type: None
21 # SYMBOL-NEXT: Other [
22 # SYMBOL-NEXT: STV_HIDDEN
24 # SYMBOL-NEXT: Section: .dynsym