Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / linkerscript / absolute.s
blobc0db81b36848ef4e437e72ec9b0f9537f08e5ba0
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "SECTIONS { foo = ABSOLUTE(.) + 1; };" > %t.script
4 # RUN: ld.lld -o %t --script %t.script %t.o
5 # RUN: llvm-readobj --symbols %t | FileCheck %s
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
8 # RUN: echo "PROVIDE(foo = 1 + ABSOLUTE(ADDR(.text)));" > %t.script
9 # RUN: ld.lld -o %t --script %t.script %t.o
10 # RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=CHECK-RHS %s
12 # CHECK: Name: foo
13 # CHECK-NEXT: Value:
14 # CHECK-NEXT: Size:
15 # CHECK-NEXT: Binding:
16 # CHECK-NEXT: Type:
17 # CHECK-NEXT: Other:
18 # CHECK-NEXT: Section: Absolute
19 # CHECK-NEXT: }
21 # CHECK-RHS: Name: foo
22 # CHECK-RHS-NEXT: Value: 0x201121
23 # CHECK-RHS-NEXT: Size:
24 # CHECK-RHS-NEXT: Binding:
25 # CHECK-RHS-NEXT: Type:
26 # CHECK-RHS-NEXT: Other:
27 # CHECK-RHS-NEXT: Section: Absolute
28 # CHECK-RHS-NEXT: }
30 .text
31 .globl _start
32 _start:
33 nop
35 .global foo