Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for zstd compressed debug sections (#318) #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EricRahm
Copy link

Add support for processing zstd compressed debug sections. lld and associated tools now support using zstd in addition to zlib for debug info compression, for example:

clang++ -gz=zstd foo.cc

clang++ -shared -W,--compress-debug-sections=zstd foo.cc

llvm-objcopy --compress-debug-sections=zstd foo.o foo-compressed.o

This CL:

  • Adds a dependency on zstd
  • Handles the ELFCOMPRESS_ZSTD ch_type flag
  • Uses zstd to decompress sections marked with ELFCOMPRESS_ZSTD

Add support for processing zstd compressed debug sections. `lld` and associated tools now support using `zstd` in addition to `zlib` for debug info compression, for example:

```
clang++ -gz=zstd foo.cc

clang++ -shared -W,--compress-debug-sections=zstd foo.cc

llvm-objcopy --compress-debug-sections=zstd foo.o foo-compressed.o
```

This CL:
- Adds a dependency on `zstd`
- Handles the `ELFCOMPRESS_ZSTD` `ch_type` flag
- Uses `zstd` to decompress sections marked with `ELFCOMPRESS_ZSTD`
@EricRahm
Copy link
Author

@haberman Mind taking a look? This doesn't have the cmake hooks, but that's a bit out of my wheelhouse and. cc @walkingeyerobot

@piwicode
Copy link

@haberman This change enables to inspect Fuchsia OS project binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants