• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Test that macho2yaml dumps the __debug_foo section (unrecognized debug section)
2## as a raw content section.
3
4# RUN: yaml2obj %s | obj2yaml | FileCheck %s --check-prefix=UNRECOGNIZED
5
6#      UNRECOGNIZED: Sections:
7# UNRECOGNIZED-NEXT:   - sectname:        __debug_foo
8# UNRECOGNIZED-NEXT:     segname:         __DWARF
9# UNRECOGNIZED-NEXT:     addr:            0x0
10# UNRECOGNIZED-NEXT:     size:            5
11# UNRECOGNIZED-NEXT:     offset:          0x210
12# UNRECOGNIZED-NEXT:     align:           0
13# UNRECOGNIZED-NEXT:     reloff:          0x0
14# UNRECOGNIZED-NEXT:     nreloc:          0
15# UNRECOGNIZED-NEXT:     flags:           0x0
16# UNRECOGNIZED-NEXT:     reserved1:       0x0
17# UNRECOGNIZED-NEXT:     reserved2:       0x0
18# UNRECOGNIZED-NEXT:     reserved3:       0x0
19# UNRECOGNIZED-NEXT:     content:         '0123456789'
20# UNRECOGNIZED-NEXT: ...
21
22--- !mach-o
23FileHeader:
24  magic:      0xFEEDFACF
25  cputype:    0x01000007
26  cpusubtype: 0x00000003
27  filetype:   0x0000000A
28  ncmds:      1
29  sizeofcmds: 232
30  flags:      0x00000000
31  reserved:   0x00000000
32LoadCommands:
33  - cmd:      LC_SEGMENT_64
34    cmdsize:  152
35    segname:  __DWARF
36    vmaddr:   0x00
37    vmsize:   0x00
38    fileoff:  0x00
39    filesize: 0x00
40    maxprot:  0
41    initprot: 0
42    nsects:   1
43    flags:    0
44    Sections:
45      - sectname:  __debug_foo
46        segname:   __DWARF
47        addr:      0x00
48        size:      5
49        offset:    528
50        align:     0
51        reloff:    0x00000000
52        nreloc:    0
53        flags:     0x00000000
54        reserved1: 0x00000000
55        reserved2: 0x00000000
56        reserved3: 0x00000000
57        content:   '0123456789'
58