1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[llvm-objdump] - Dump the archive headers when -all-headers is specified.

When -all-headers is given it is supposed to dump all headers,
but now it skips the archive headers for no reason.

The patch fixes that.

Differential revision: https://reviews.llvm.org/D56780

llvm-svn: 351547
This commit is contained in:
George Rimar 2019-01-18 12:01:59 +00:00
parent 588ddb3054
commit 3b0a98a3a9
2 changed files with 27 additions and 2 deletions

View File

@ -11,6 +11,31 @@
# CHECK-EMPTY: # CHECK-EMPTY:
# CHECK-NEXT: Sections: # CHECK-NEXT: Sections:
## Check how we dump the archives.
## Check we dump the appropriate headers for each file in the archive.
# RUN: cp %t %t2
# RUN: rm -f %t.a
# RUN: llvm-ar rcs %t.a %t %t2
# RUN: llvm-objdump --all-headers %t.a | FileCheck %s --check-prefix=ARCHIVE
# ARCHIVE: {{.*}}.a({{.*}}): file format ELF64-x86-64
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
# ARCHIVE: rw-r--r--
# ARCHIVE: Sections:
# ARCHIVE: SYMBOL TABLE:
# ARCHIVE: Program Header:
# ARCHIVE: Dynamic Section:
# ARCHIVE: {{.*}}.a({{.*}}2): file format ELF64-x86-64
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
# ARCHIVE: rw-r--r--
# ARCHIVE: Sections:
# ARCHIVE: SYMBOL TABLE:
# ARCHIVE: Program Header:
# ARCHIVE: Dynamic Section:
!ELF !ELF
FileHeader: FileHeader:
Class: ELFCLASS64 Class: ELFCLASS64

View File

@ -2036,8 +2036,8 @@ int main(int argc, char **argv) {
InputFilenames.push_back("a.out"); InputFilenames.push_back("a.out");
if (AllHeaders) if (AllHeaders)
FileHeaders = PrivateHeaders = Relocations = SectionHeaders = SymbolTable = ArchiveHeaders = FileHeaders = PrivateHeaders = Relocations =
true; SectionHeaders = SymbolTable = true;
if (DisassembleAll || PrintSource || PrintLines) if (DisassembleAll || PrintSource || PrintLines)
Disassemble = true; Disassemble = true;