1 # REQUIRES: system-linux
3 # RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o
4 # RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q
5 # RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
6 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
7 # RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
9 # This test checks we correctly insert DW_AT_addr_base, when converting DW_AT_low_pc into DW_AT_ranges.
10 # PRECHECK-NOT: DW_AT_addr_base
12 # POSTCHECK: DW_AT_ranges [DW_FORM_rnglistx]
13 # POSTCHECK: DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c)
14 # POSTCHECK-NEXT: DW_AT_addr_base [DW_FORM_sec_offset] (0x00000008)
32 .cfi_def_cfa_offset 16
35 .cfi_def_cfa_register 6
46 .section .debug_info,"",@progbits
59 .quad .Letext0-.Ltext0
76 .section .debug_abbrev,"",@progbits
134 .section .debug_aranges,"",@progbits
143 .quad .Letext0-.Ltext0
146 .section .debug_line,"",@progbits
148 .section .debug_str,"MS",@progbits,1
150 .string "GNU C++14 8.5.0 20210514 (Red Hat 8.5.0-3) -mtune=generic -march=x86-64 -g2 -gdwarf-5"
157 .ident "GCC: (GNU) 8.5.0 20210514 (Red Hat 8.5.0-3)"
158 .section .note.GNU-stack,"",@progbits