1# RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o - | \
2# RUN:   llvm-dwarfdump -debug-addr - | \
3# RUN:   FileCheck %s
4
5## This checks that we use DWARFDataExtractor::getRelocatedAddress() to read
6## addresses of an address table. In this test, the raw data in the .debug_addr
7## section does not contain the full address, thus, it is required to resolve
8## a RELA relocation to recover the real value.
9
10# CHECK:      .debug_addr contents
11# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00
12# CHECK-NEXT: Addrs: [
13# CHECK-NEXT: 0x000000000000002a
14# CHECK-NEXT: ]
15
16    .text
17    .space  0x2a
18.Lfoo:
19
20    .section .debug_addr,"",@progbits
21    .long   .LAddr0end-.LAddr0version   # Length
22.LAddr0version:
23    .short  5                           # Version
24    .byte   8                           # Address size
25    .byte   0                           # Segment selector size
26.LAddr0table:
27    .quad   .Lfoo
28.LAddr0end:
29