llvm-project/llvm/test/tools/llvm-objdump/MachO/section-headers.test
Fangrui Song 0c2e2f88fb [llvm-objdump] Improve newline consistency between different pieces of information
When dumping multiple pieces of information (e.g. --all-headers),
there is sometimes no separator between two pieces.
This patch uses the "\nheader:\n" style, which generally improves
compatibility with GNU objdump.

Note: objdump -t/-T does not add a newline before "SYMBOL TABLE:" and "DYNAMIC SYMBOL TABLE:".
We add a newline to be consistent with other information.

`objdump -d` prints two empty lines before the first 'Disassembly of section'.
We print just one with this patch.

Differential Revision: https://reviews.llvm.org/D101796
2021-05-04 09:56:07 -07:00

10 lines
478 B
Plaintext

RUN: llvm-objdump --macho -h %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s --strict-whitespace --match-full-lines
CHECK:{{^$}}
CHECK-NEXT:Sections:
CHECK-NEXT:Idx Name Size VMA Type
CHECK-NEXT: 0 __text 0000003b 0000000000000000 TEXT
CHECK-NEXT: 1 __cstring 0000000d 000000000000003b DATA
CHECK-NEXT: 2 __compact_unwind 00000020 0000000000000048 DATA
CHECK-NEXT: 3 __eh_frame 00000040 0000000000000068 DATA