clang 14 removed -gz=zlib-gnu and ld.lld/llvm-objcopy removed .zdebug support recently. llvm-dwp currently doesn't support SHF_COMPRESSED. Add support and remove .zdebug support. Simplify llvm::object::Decompressor which has no .zdebug user now. While here, add tests for ELF32LE, ELF32BE, and ELF64BE. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D129728
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
# REQUIRES: zlib
|
|
# RUN: yaml2obj --docnum=1 %s -o %t1.o
|
|
# RUN: not llvm-dwp %t1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1
|
|
# RUN: yaml2obj --docnum=2 %s -o %t2.o
|
|
# RUN: not llvm-dwp %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
|
|
|
|
# ERR1: error: failure while decompressing compressed section: '.debug_info.dwo', corrupted compressed section header
|
|
# ERR2: error: failure while decompressing compressed section: '.debug_info.dwo', zlib error: Z_DATA_ERROR
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .debug_info.dwo
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_COMPRESSED ]
|
|
AddressAlign: 8
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .debug_info.dwo
|
|
Type: SHT_PROGBITS
|
|
Flags: [ SHF_COMPRESSED ]
|
|
AddressAlign: 8
|
|
Content: "010000000000000004000000000000000100000000000000ffff"
|