Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-objcopy] Remove support for legacy .zdebug sections
clang 14 removed -gz=zlib-gnu support and ld.lld removed linker input support for zlib-gnu in D126793. Now let's remove zlib-gnu from llvm-objcopy. * .zdebug* sections are no longer recognized as debug sections. --strip* don't remove them. They are copied like other opaque sections * --decompress-debug-sections does not uncompress .zdebug* sections * --compress-debug-sections=zlib-gnu is not supported It is very rare but in case a user has object files using .zdebug . They can use llvm-objcopy<15 or GNU objcopy for uncompression. --compress-debug-sections=zlib-gnu is unlikely ever used by anyone, so I do not add a custom diagnostic. Differential Revision: https://reviews.llvm.org/D128688
- Loading branch information
Showing
14 changed files
with
55 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default-gnu.test
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-invalid-format.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o | ||
# RUN: not llvm-objcopy --compress-debug-sections=zlib-fake %t.o 2>&1 | FileCheck %s | ||
# RUN: not llvm-objcopy --compress-debug-sections=zlib-gnu %t.o 2>&1 | FileCheck %s --check-prefix=GNU | ||
|
||
# CHECK: invalid or unsupported --compress-debug-sections format: zlib-fake | ||
|
||
# GNU: invalid or unsupported --compress-debug-sections format: zlib-gnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## .zdebug is no longer recognized as zlib-gnu compressed sections. It's treated | ||
## as an opaque non-debug section. | ||
# RUN: yaml2obj %s -o %t | ||
# RUN: llvm-objcopy --decompress-debug-sections %t %t.copy | ||
# RUN: llvm-readelf -S %t.copy | FileCheck %s | ||
|
||
# CHECK: .zdebug_str | ||
|
||
--- !ELF | ||
FileHeader: | ||
Class: ELFCLASS64 | ||
Data: ELFDATA2LSB | ||
Type: ET_REL | ||
Machine: EM_X86_64 | ||
Sections: | ||
- Name: .text | ||
Type: SHT_PROGBITS | ||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ] | ||
Content: '00' | ||
- Name: .zdebug_str | ||
Type: SHT_PROGBITS | ||
Content: 5a4c49420000000000000002789c4b64000000c40062 | ||
AddressAlign: 8 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters