2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/synthetic-symbols.s -o %t
3 # RUN: ld.lld -o %t.exe --eh-frame-hdr --script %s %t
4 # RUN: llvm-objdump -t %t.exe | FileCheck %s
6 # Simple symbol assignment within input section list. The '.' symbol
7 # is not location counter but offset from the beginning of output
14 PROVIDE(_begin_sec = .);
17 PROVIDE_HIDDEN(_end_sec = .);
18 PROVIDE(_end_sec_abs = ABSOLUTE(.));
19 size_foo_1 = SIZEOF(.foo);
20 size_foo_1_abs = ABSOLUTE(SIZEOF(.foo));
25 size_foo_2 = SIZEOF(.foo);
28 size_foo_3 = SIZEOF(.foo);
31 __eh_frame_hdr_start = .;
32 __eh_frame_hdr_start2 = ABSOLUTE(ALIGN(0x10));
34 __eh_frame_hdr_end = .;
35 __eh_frame_hdr_end2 = ABSOLUTE(ALIGN(0x10));
41 # CHECK: 0000000000000160 l .foo 0000000000000000 .hidden _end_sec
42 # CHECK-NEXT: 000000000000104c g .text 0000000000000000 _start
43 # CHECK-NEXT: 0000000000000158 g .foo 0000000000000000 _begin_sec
44 # CHECK-NEXT: 0000000000000160 g *ABS* 0000000000000000 _end_sec_abs
45 # CHECK-NEXT: 0000000000000158 g .foo 0000000000000000 begin_foo
46 # CHECK-NEXT: 0000000000000160 g .foo 0000000000000000 end_foo
47 # CHECK-NEXT: 0000000000000008 g *ABS* 0000000000000000 size_foo_1
48 # CHECK-NEXT: 0000000000000008 g *ABS* 0000000000000000 size_foo_1_abs
49 # CHECK-NEXT: 0000000000001000 g .foo 0000000000000000 begin_bar
50 # CHECK-NEXT: 0000000000001004 g .foo 0000000000000000 end_bar
51 # CHECK-NEXT: 0000000000000eac g *ABS* 0000000000000000 size_foo_2
52 # CHECK-NEXT: 0000000000000eac g *ABS* 0000000000000000 size_foo_3
53 # CHECK-NEXT: 0000000000001004 g .eh_frame_hdr 0000000000000000 __eh_frame_hdr_start
54 # CHECK-NEXT: 0000000000001010 g *ABS* 0000000000000000 __eh_frame_hdr_start2
55 # CHECK-NEXT: 0000000000001018 g .eh_frame_hdr 0000000000000000 __eh_frame_hdr_end
56 # CHECK-NEXT: 0000000000001020 g *ABS* 0000000000000000 __eh_frame_hdr_end2