File: dwarfdump-rela-dwo.s

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (57 lines) | stat: -rw-r--r-- 2,235 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Test objective to verify warning is printed if DWO secton has relocations.
#
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
# RUN: llvm-dwarfdump --debug-info %t.o | FileCheck %s
# RUN: llvm-dwarfdump --debug-info %t.o 2> %t.txt
# RUN: cat %t.txt | FileCheck %s --check-prefix=PART2

        .section .debug_str.dwo,"MSe",@progbits,1
.dwo_producer:
        .asciz "Handmade DWO producer"
.dwo_CU_5:
        .asciz "V5_dwo_compile_unit"

        .section	.debug_str_offsets.dwo,"e",@progbits
        .long	Lstr_offsets_end-Lstr_offsets_start                              # Length of String Offsets Set
        Lstr_offsets_start:
	.short	5
	.short	0
	.long	.dwo_producer-.debug_str.dwo
	.long	.dwo_CU_5-.debug_str.dwo
        Lstr_offsets_end:

# And a .dwo copy for the .dwo sections.
        .section .debug_abbrev.dwo,"e",@progbits
        .byte 0x01  # Abbrev code
        .byte 0x11  # DW_TAG_compile_unit
        .byte 0x00  # DW_CHILDREN_no
        .byte 0x25  # DW_AT_producer
        .byte 0x0e  # DW_FORM_strp
        .byte 0x03  # DW_AT_name
        .byte 0x25  # DW_FORM_strx1
        .byte 0x00  # EOM(1)
        .byte 0x00  # EOM(2)

        .section .debug_info.dwo,"e",@progbits
# CHECK-LABEL: .debug_info.dwo

# DWARF v5 split CU header.
        .long  CU_split_5_end-CU_split_5_version # Length of Unit
CU_split_5_version:
        .short 5                # DWARF version number
        .byte 5                 # DWARF Unit Type
        .byte 8                 # Address Size (in bytes)
        .long 0 # Offset Into Abbrev. Section
        .quad 0x5a              # DWO ID
# The split compile-unit DIE, with DW_AT_producer, DW_AT_name, DW_AT_stmt_list.
        .byte 1
        .long .dwo_producer
        .byte 1
        .byte 0 # NULL
CU_split_5_end:

# CHECK: 0x00000000: Compile Unit: length = 0x00000017, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = 0x000000000000005a (next unit at 0x0000001b)
# CHECK: 0x00000014: DW_TAG_compile_unit
# CHECK-NEXT: DW_AT_producer	("Handmade DWO producer")
# CHECK-NEXT: DW_AT_name	("V5_dwo_compile_unit")
# PART2: warning: Unexpected relocations for dwo section rela.debug_info.dwo