llvm-project/llvm/test/Object/AArch64/chained-fixups-header.test
Nico Weber 1642667392 [llvm-objdump --macho] Rename --dyld_info to --dyld-info
llvm-objdump takes foo-bar style flags, while llvm-otool takes foo_bar style
flags.  dyld_info was the only exception to that.

Add a -dyld_info flag to llvm-otool instead.

(Both in llvm-objdump and llvm-otool, the flag doesn't really do anything
yet.)

Differential Revision: https://reviews.llvm.org/D131897
2022-08-17 12:58:29 -04:00

25 lines
1.3 KiB
Plaintext

REQUIRES: host-byteorder-little-endian
RUN: cat %p/../Inputs/MachO/chained-fixups.yaml \
RUN: | sed 's/__LINKEDIT: 00000000/__LINKEDIT: AB000000/' \
RUN: | yaml2obj | not llvm-objdump --macho --dyld-info - 2>&1 \
RUN: | FileCheck %s --check-prefix=HEADER1
HEADER1: truncated or malformed object (bad chained fixups: unknown version: 171)
RUN: cat %p/../Inputs/MachO/chained-fixups.yaml \
RUN: | sed 's/1000000010000000/1000000AB0000000/' \
RUN: | yaml2obj | not llvm-objdump --macho --dyld-info - 2>&1 \
RUN: | FileCheck %s --check-prefix=HEADER2
HEADER2: truncated or malformed object (bad chained fixups: unknown imports format: 171)
RUN: cat %p/../Inputs/MachO/chained-fixups.yaml \
RUN: | sed 's/20000000/01000000/' \
RUN: | yaml2obj | not llvm-objdump --macho --dyld-info - 2>&1 \
RUN: | FileCheck %s --check-prefix=HEADER3
HEADER3: truncated or malformed object (bad chained fixups: image starts offset 1 overlaps with chained fixups header)
RUN: cat %p/../Inputs/MachO/chained-fixups.yaml \
RUN: | sed 's/20000000/FF000000/' \
RUN: | yaml2obj | not llvm-objdump --macho --dyld-info - 2>&1 \
RUN: | FileCheck %s --check-prefix=HEADER4
HEADER4: truncated or malformed object (bad chained fixups: image starts end 33031 extends past end 32856)