mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-12 19:01:55 +00:00
8c2406b1fc
Using vmsize to populate this file works when outputing MachO images, but fails when outputting relocatable objects. This patch fixes the computation to use file offsets, which works for both output types. Fixes <rdar://problem/27727666> llvm-svn: 278297
32 lines
928 B
YAML
32 lines
928 B
YAML
# RUN: lld -flavor darwin -arch x86_64 -r -o %t %s && llvm-objdump -private-headers %t | FileCheck %s
|
|
|
|
# CHECK: filesize 19
|
|
|
|
--- !mach-o
|
|
arch: x86_64
|
|
file-type: MH_OBJECT
|
|
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
|
|
sections:
|
|
- segment: __TEXT
|
|
section: __text
|
|
type: S_REGULAR
|
|
attributes: [ S_ATTR_PURE_INSTRUCTIONS ]
|
|
alignment: 16
|
|
address: 0x0000000000000000
|
|
content: [ 0x00, 0x00, 0x00 ]
|
|
- segment: __TEXT
|
|
section: __alt
|
|
type: S_REGULAR
|
|
attributes: [ S_ATTR_PURE_INSTRUCTIONS ]
|
|
alignment: 16
|
|
address: 0x0000000000000010
|
|
content: [ 0x00, 0x00, 0x00 ]
|
|
global-symbols:
|
|
- name: _main
|
|
type: N_SECT
|
|
scope: [ N_EXT ]
|
|
sect: 1
|
|
value: 0x0000000000000000
|
|
page-size: 0x00000000
|
|
...
|