1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/ehframe-relocation.s  -o %t2.o
4// RUN: ld.lld %t.o %t2.o -o %t
5// RUN: llvm-readobj -s %t | FileCheck %s
6// RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
7
8// CHECK:      Name: .eh_frame
9// CHECK-NEXT: Type: SHT_PROGBITS
10// CHECK-NEXT: Flags [
11// CHECK-NEXT:   SHF_ALLOC
12// CHECK-NEXT: ]
13// CHECK-NEXT: Address: 0x200120
14// CHECK-NEXT: Offset:
15// CHECK-NEXT: Size: 52
16// CHECK-NOT: .eh_frame
17
18// 0x200120 = 2097440
19// 0x200120 + 5 = 2097445
20// DISASM:      Disassembly of section .text:
21// DISASM-NEXT: _start:
22// DISASM-NEXT:   201000: {{.*}} movq 2097440, %rax
23// DISASM-NEXT:   201008: {{.*}} movq 2097445, %rax
24
25.section .eh_frame,"ax",@unwind
26
27.section .text
28.globl _start
29_start:
30 movq .eh_frame, %rax
31 movq .eh_frame + 5, %rax
32