2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: ld.lld --gdb-index -shared %t.o -o /dev/null
5 # This used to fail trying to compute R_X86_64_DTPOFF64
7 .section .tdata,"awT",@progbits
11 .section .debug_str,"MS",@progbits,1
14 .section .debug_abbrev,"",@progbits
15 .byte 1 # Abbreviation Code
16 .byte 17 # DW_TAG_compile_unit
17 .byte 1 # DW_CHILDREN_yes
18 .byte 37 # DW_AT_producer
19 .byte 14 # DW_FORM_strp
20 .byte 19 # DW_AT_language
21 .byte 5 # DW_FORM_data2
23 .byte 14 # DW_FORM_strp
24 .byte 16 # DW_AT_stmt_list
25 .byte 23 # DW_FORM_sec_offset
26 .byte 27 # DW_AT_comp_dir
27 .byte 14 # DW_FORM_strp
28 .ascii "\264B" # DW_AT_GNU_pubnames
29 .byte 25 # DW_FORM_flag_present
32 .byte 2 # Abbreviation Code
33 .byte 52 # DW_TAG_variable
34 .byte 0 # DW_CHILDREN_no
36 .byte 14 # DW_FORM_strp
38 .byte 19 # DW_FORM_ref4
39 .byte 63 # DW_AT_external
40 .byte 25 # DW_FORM_flag_present
41 .byte 58 # DW_AT_decl_file
42 .byte 11 # DW_FORM_data1
43 .byte 59 # DW_AT_decl_line
44 .byte 11 # DW_FORM_data1
45 .byte 2 # DW_AT_location
46 .byte 24 # DW_FORM_exprloc
49 .byte 3 # Abbreviation Code
50 .byte 36 # DW_TAG_base_type
51 .byte 0 # DW_CHILDREN_no
53 .byte 14 # DW_FORM_strp
54 .byte 62 # DW_AT_encoding
55 .byte 11 # DW_FORM_data1
56 .byte 11 # DW_AT_byte_size
57 .byte 11 # DW_FORM_data1
62 .section .debug_info,"",@progbits
64 .long 56 # Length of Unit
65 .short 4 # DWARF version number
66 .long .debug_abbrev # Offset Into Abbrev. Section
67 .byte 8 # Address Size (in bytes)
68 .byte 1 # Abbrev [1] 0xb:0x31 DW_TAG_compile_unit
69 .long .debug_str # DW_AT_producer
70 .short 4 # DW_AT_language
71 .long .debug_str # DW_AT_name
72 .long .debug_line # DW_AT_stmt_list
73 .long .debug_str # DW_AT_comp_dir
75 .byte 2 # Abbrev [2] 0x1e:0x16 DW_TAG_variable
76 .long .debug_str # DW_AT_name
79 .byte 1 # DW_AT_decl_file
80 .byte 1 # DW_AT_decl_line
81 .byte 10 # DW_AT_location
83 .quad PrettyStackTraceHead@DTPOFF
85 .byte 3 # Abbrev [3] 0x34:0x7 DW_TAG_base_type
86 .long .debug_str # DW_AT_name
87 .byte 5 # DW_AT_encoding
88 .byte 4 # DW_AT_byte_size
89 .byte 0 # End Of Children Mark
91 .section .debug_line,"",@progbits