reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
RUN: llvm-readobj -h %p/Inputs/macho-universal.x86_64.i386 \
RUN: | FileCheck %s -check-prefix MULTIHEADER

RUN: llvm-readobj --sections %p/Inputs/macho-universal.x86_64.i386 \
RUN: | FileCheck %s -check-prefix MULTISECTIONS

RUN: llvm-readobj -h %p/Inputs/macho-universal-archive.x86_64.i386 \
RUN: | FileCheck %s -check-prefix MULTIHEADER-ARCHIVE \
RUN:                -DARFILE="%p/Inputs/macho-universal-archive.x86_64.i386"

RUN: llvm-readobj --sections %p/Inputs/macho-universal-archive.x86_64.i386 \
RUN: | FileCheck %s -check-prefix MULTISECTIONS-ARCHIVE \
RUN:                -DARFILE="%p/Inputs/macho-universal-archive.x86_64.i386"

MULTIHEADER: Format: Mach-O 64-bit x86-64
MULTIHEADER: Arch: x86_64
MULTIHEADER: AddressSize: 64bit
MULTIHEADER: MachHeader {
MULTIHEADER:   Magic: Magic64 (0xFEEDFACF)
MULTIHEADER:   CpuType: X86-64 (0x1000007)
MULTIHEADER:   CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
MULTIHEADER:   FileType: Executable (0x2)
MULTIHEADER:   NumOfLoadCommands: 16
MULTIHEADER:   SizeOfLoadCommands: 880
MULTIHEADER:   Flags [ (0x200085)
MULTIHEADER:     MH_DYLDLINK (0x4)
MULTIHEADER:     MH_NOUNDEFS (0x1)
MULTIHEADER:     MH_PIE (0x200000)
MULTIHEADER:     MH_TWOLEVEL (0x80)
MULTIHEADER:   ]
MULTIHEADER:   Reserved: 0x0
MULTIHEADER: }

MULTIHEADER: Format: Mach-O 32-bit i386
MULTIHEADER: Arch: i386
MULTIHEADER: AddressSize: 32bit
MULTIHEADER: MachHeader {
MULTIHEADER:   Magic: Magic (0xFEEDFACE)
MULTIHEADER:   CpuType: X86 (0x7)
MULTIHEADER:   CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
MULTIHEADER:   FileType: Executable (0x2)
MULTIHEADER:   NumOfLoadCommands: 16
MULTIHEADER:   SizeOfLoadCommands: 716
MULTIHEADER:   Flags [ (0x1200085)
MULTIHEADER:     MH_DYLDLINK (0x4)
MULTIHEADER:     MH_NOUNDEFS (0x1)
MULTIHEADER:     MH_NO_HEAP_EXECUTION (0x1000000)
MULTIHEADER:     MH_PIE (0x200000)
MULTIHEADER:     MH_TWOLEVEL (0x80)
MULTIHEADER:   ]
MULTIHEADER: }



MULTISECTIONS: Format: Mach-O 64-bit x86-64
MULTISECTIONS: Arch: x86_64
MULTISECTIONS: AddressSize: 64bit
MULTISECTIONS: Sections [
MULTISECTIONS:   Section {
MULTISECTIONS:     Index: 0
MULTISECTIONS:     Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Address: 0x100000F60
MULTISECTIONS:     Size: 0x12
MULTISECTIONS:     Offset: 3936
MULTISECTIONS:     Alignment: 4
MULTISECTIONS:     RelocationOffset: 0x0
MULTISECTIONS:     RelocationCount: 0
MULTISECTIONS:     Type: Regular (0x0)
MULTISECTIONS:     Attributes [ (0x800004)
MULTISECTIONS:       PureInstructions (0x800000)
MULTISECTIONS:       SomeInstructions (0x4)
MULTISECTIONS:     ]
MULTISECTIONS:     Reserved1: 0x0
MULTISECTIONS:     Reserved2: 0x0
MULTISECTIONS:   }
MULTISECTIONS:   Section {
MULTISECTIONS:     Index: 1
MULTISECTIONS:     Name: __unwind_info (5F 5F 75 6E 77 69 6E 64 5F 69 6E 66 6F 00 00 00)
MULTISECTIONS:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Address: 0x100000F72
MULTISECTIONS:     Size: 0x48
MULTISECTIONS:     Offset: 3954
MULTISECTIONS:     Alignment: 0
MULTISECTIONS:     RelocationOffset: 0x0
MULTISECTIONS:     RelocationCount: 0
MULTISECTIONS:     Type: Regular (0x0)
MULTISECTIONS:     Attributes [ (0x0)
MULTISECTIONS:     ]
MULTISECTIONS:     Reserved1: 0x0
MULTISECTIONS:     Reserved2: 0x0
MULTISECTIONS:   }
MULTISECTIONS:   Section {
MULTISECTIONS:     Index: 2
MULTISECTIONS:     Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
MULTISECTIONS:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Address: 0x100000FC0
MULTISECTIONS:     Size: 0x40
MULTISECTIONS:     Offset: 4032
MULTISECTIONS:     Alignment: 3
MULTISECTIONS:     RelocationOffset: 0x0
MULTISECTIONS:     RelocationCount: 0
MULTISECTIONS:     Type: Regular (0x0)
MULTISECTIONS:     Attributes [ (0x0)
MULTISECTIONS:     ]
MULTISECTIONS:     Reserved1: 0x0
MULTISECTIONS:     Reserved2: 0x0
MULTISECTIONS:   }
MULTISECTIONS: ]

MULTISECTIONS: Format: Mach-O 32-bit i386
MULTISECTIONS: Arch: i386
MULTISECTIONS: AddressSize: 32bit
MULTISECTIONS: Sections [
MULTISECTIONS:   Section {
MULTISECTIONS:     Index: 0
MULTISECTIONS:     Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Address: 0x1FA0
MULTISECTIONS:     Size: 0x15
MULTISECTIONS:     Offset: 4000
MULTISECTIONS:     Alignment: 4
MULTISECTIONS:     RelocationOffset: 0x0
MULTISECTIONS:     RelocationCount: 0
MULTISECTIONS:     Type: Regular (0x0)
MULTISECTIONS:     Attributes [ (0x800004)
MULTISECTIONS:       PureInstructions (0x800000)
MULTISECTIONS:       SomeInstructions (0x4)
MULTISECTIONS:     ]
MULTISECTIONS:     Reserved1: 0x0
MULTISECTIONS:     Reserved2: 0x0
MULTISECTIONS:   }
MULTISECTIONS:   Section {
MULTISECTIONS:     Index: 1
MULTISECTIONS:     Name: __unwind_info (5F 5F 75 6E 77 69 6E 64 5F 69 6E 66 6F 00 00 00)
MULTISECTIONS:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS:     Address: 0x1FB5
MULTISECTIONS:     Size: 0x48
MULTISECTIONS:     Offset: 4021
MULTISECTIONS:     Alignment: 0
MULTISECTIONS:     RelocationOffset: 0x0
MULTISECTIONS:     RelocationCount: 0
MULTISECTIONS:     Type: Regular (0x0)
MULTISECTIONS:     Attributes [ (0x0)
MULTISECTIONS:     ]
MULTISECTIONS:     Reserved1: 0x0
MULTISECTIONS:     Reserved2: 0x0
MULTISECTIONS:   }
MULTISECTIONS: ]

MULTIHEADER-ARCHIVE: {{^$}}
MULTIHEADER-ARCHIVE-NEXT: File: [[ARFILE]](hello.o)
MULTIHEADER-ARCHIVE: Format: Mach-O 64-bit x86-64
MULTIHEADER-ARCHIVE: Arch: x86_64
MULTIHEADER-ARCHIVE: AddressSize: 64bit
MULTIHEADER-ARCHIVE: MachHeader {
MULTIHEADER-ARCHIVE:   Magic: Magic64 (0xFEEDFACF)
MULTIHEADER-ARCHIVE:   CpuType: X86-64 (0x1000007)
MULTIHEADER-ARCHIVE:   CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
MULTIHEADER-ARCHIVE:   FileType: Relocatable (0x1)
MULTIHEADER-ARCHIVE:   NumOfLoadCommands: 3
MULTIHEADER-ARCHIVE:   SizeOfLoadCommands: 496
MULTIHEADER-ARCHIVE:   Flags [ (0x2000)
MULTIHEADER-ARCHIVE:     MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
MULTIHEADER-ARCHIVE:   ]
MULTIHEADER-ARCHIVE:   Reserved: 0x0
MULTIHEADER-ARCHIVE: }
MULTIHEADER-ARCHIVE-EMPTY:
MULTIHEADER-ARCHIVE-NEXT: File: [[ARFILE]](foo.o)
MULTIHEADER-ARCHIVE: Format: Mach-O 32-bit i386
MULTIHEADER-ARCHIVE: Arch: i386
MULTIHEADER-ARCHIVE: AddressSize: 32bit
MULTIHEADER-ARCHIVE: MachHeader {
MULTIHEADER-ARCHIVE:   Magic: Magic (0xFEEDFACE)
MULTIHEADER-ARCHIVE:   CpuType: X86 (0x7)
MULTIHEADER-ARCHIVE:   CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
MULTIHEADER-ARCHIVE:   FileType: Relocatable (0x1)
MULTIHEADER-ARCHIVE:   NumOfLoadCommands: 3
MULTIHEADER-ARCHIVE:   SizeOfLoadCommands: 296
MULTIHEADER-ARCHIVE:   Flags [ (0x2000)
MULTIHEADER-ARCHIVE:     MH_SUBSECTIONS_VIA_SYMBOLS (0x2000)
MULTIHEADER-ARCHIVE:   ]
MULTIHEADER-ARCHIVE: }

MULTISECTIONS-ARCHIVE: {{^$}}
MULTISECTIONS-ARCHIVE-NEXT: File: [[ARFILE]](hello.o)
MULTISECTIONS-ARCHIVE: Format: Mach-O 64-bit x86-64
MULTISECTIONS-ARCHIVE: Arch: x86_64
MULTISECTIONS-ARCHIVE: AddressSize: 64bit
MULTISECTIONS-ARCHIVE: Sections [
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 0
MULTISECTIONS-ARCHIVE:     Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x0
MULTISECTIONS-ARCHIVE:     Size: 0x3B
MULTISECTIONS-ARCHIVE:     Offset: 528
MULTISECTIONS-ARCHIVE:     Alignment: 4
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x2B8
MULTISECTIONS-ARCHIVE:     RelocationCount: 2
MULTISECTIONS-ARCHIVE:     Type: Regular (0x0)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x800004)
MULTISECTIONS-ARCHIVE:       PureInstructions (0x800000)
MULTISECTIONS-ARCHIVE:       SomeInstructions (0x4)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 1
MULTISECTIONS-ARCHIVE:     Name: __cstring (5F 5F 63 73 74 72 69 6E 67 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x3B
MULTISECTIONS-ARCHIVE:     Size: 0xD
MULTISECTIONS-ARCHIVE:     Offset: 587
MULTISECTIONS-ARCHIVE:     Alignment: 0
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE:     RelocationCount: 0
MULTISECTIONS-ARCHIVE:     Type: CStringLiterals (0x2)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x0)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 2
MULTISECTIONS-ARCHIVE:     Name: __compact_unwind (5F 5F 63 6F 6D 70 61 63 74 5F 75 6E 77 69 6E 64)
MULTISECTIONS-ARCHIVE:     Segment: __LD (5F 5F 4C 44 00 00 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x48
MULTISECTIONS-ARCHIVE:     Size: 0x20
MULTISECTIONS-ARCHIVE:     Offset: 600
MULTISECTIONS-ARCHIVE:     Alignment: 3
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x2C8
MULTISECTIONS-ARCHIVE:     RelocationCount: 1
MULTISECTIONS-ARCHIVE:     Type: Regular (0x0)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x20000)
MULTISECTIONS-ARCHIVE:       Debug (0x20000)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 3
MULTISECTIONS-ARCHIVE:     Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x68
MULTISECTIONS-ARCHIVE:     Size: 0x40
MULTISECTIONS-ARCHIVE:     Offset: 632
MULTISECTIONS-ARCHIVE:     Alignment: 3
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE:     RelocationCount: 0
MULTISECTIONS-ARCHIVE:     Type: Coalesced (0xB)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x680000)
MULTISECTIONS-ARCHIVE:       LiveSupport (0x80000)
MULTISECTIONS-ARCHIVE:       NoTOC (0x400000)
MULTISECTIONS-ARCHIVE:       StripStaticSyms (0x200000)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE: ]
MULTISECTIONS-ARCHIVE-EMPTY:
MULTISECTIONS-ARCHIVE-NEXT: File: [[ARFILE]](foo.o)
MULTISECTIONS-ARCHIVE: Format: Mach-O 32-bit i386
MULTISECTIONS-ARCHIVE: Arch: i386
MULTISECTIONS-ARCHIVE: AddressSize: 32bit
MULTISECTIONS-ARCHIVE: Sections [
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 0
MULTISECTIONS-ARCHIVE:     Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x0
MULTISECTIONS-ARCHIVE:     Size: 0x5
MULTISECTIONS-ARCHIVE:     Offset: 324
MULTISECTIONS-ARCHIVE:     Alignment: 4
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE:     RelocationCount: 0
MULTISECTIONS-ARCHIVE:     Type: Regular (0x0)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x800004)
MULTISECTIONS-ARCHIVE:       PureInstructions (0x800000)
MULTISECTIONS-ARCHIVE:       SomeInstructions (0x4)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE:   Section {
MULTISECTIONS-ARCHIVE:     Index: 1
MULTISECTIONS-ARCHIVE:     Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
MULTISECTIONS-ARCHIVE:     Address: 0x8
MULTISECTIONS-ARCHIVE:     Size: 0x4
MULTISECTIONS-ARCHIVE:     Offset: 332
MULTISECTIONS-ARCHIVE:     Alignment: 2
MULTISECTIONS-ARCHIVE:     RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE:     RelocationCount: 0
MULTISECTIONS-ARCHIVE:     Type: Regular (0x0)
MULTISECTIONS-ARCHIVE:     Attributes [ (0x0)
MULTISECTIONS-ARCHIVE:     ]
MULTISECTIONS-ARCHIVE:     Reserved1: 0x0
MULTISECTIONS-ARCHIVE:     Reserved2: 0x0
MULTISECTIONS-ARCHIVE:   }
MULTISECTIONS-ARCHIVE: ]