forked from OSchip/llvm-project
3fb120f12e
Summary: With Mach-O, there is a flag requirement discrepancy between working with universal binaries and thin binaries. Many flags that don't require the `-macho` flag (for example `-private-headers` and `-disassemble`) fail to work on universal binaries unless `-macho` is given. When this happens, the error message is unhelpful, stating: The file was not recognized as a valid object file. Which can lead to confusion. This change allows generic flags to be used on universal binaries with and without the `-macho` flag. This means flags that can be used for thin files can be used consistently with fat files too. To do this, the universal binary support within `ParseInputMachO()` is extracted into a new function. This new function is called directly from `DumpInput()` when the input binary is universal. Additionally the `-arch` flag validation in `ParseInputMachO()` was extracted to be reused. Reviewers: compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48702 llvm-svn: 338792 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
Hexagon | ||
Inputs | ||
Mips | ||
WebAssembly | ||
X86 | ||
archive-headers.test | ||
call-absolute-symbol-elf.test | ||
coff-file.test | ||
coff-import-library.test | ||
coff-large-bss.test | ||
coff-many-relocs.test | ||
coff-non-null-terminated-file.test | ||
coff-private-headers.test | ||
common-symbol-elf.test | ||
eh_frame-arm64.test | ||
eh_frame-mipsel.test | ||
eh_frame_zero_cie.test | ||
embedded-source.test | ||
file-headers-coff.test | ||
file-headers-elf.test | ||
file-headers-pe.test | ||
file-headers-unsupported.test | ||
hex-relocation-addr.test | ||
invalid-input.test | ||
macho-LLVM-bundle.test | ||
macho-bad-bind.test | ||
macho-bad-ordinal.test | ||
macho-bad-trie.test | ||
macho-bind.test | ||
macho-bind2.test | ||
macho-compact-unwind-i386.test | ||
macho-compact-unwind-x86_64.test | ||
macho-exports-trie.test | ||
macho-lazy-bind.test | ||
macho-objc-meta-data.test | ||
macho-rebase.test | ||
macho-sections.test | ||
macho-unwind-info-arm64.test | ||
macho-unwind-info-no-relocs.test | ||
macho-unwind-info-x86_64.test | ||
macho-weak-bind.test | ||
malformed-archives.test | ||
malformed-macho.test | ||
malformed-unwind-x86_64.test | ||
private-headers-dynamic-section.test | ||
private-headers-no-dynamic-segment.test | ||
private-headers-no-dynamic.test | ||
proc-specific-section-elf.test | ||
section-filter.test | ||
wasm-corrupt-section.test | ||
wasm.txt | ||
win64-unwind-data.test |