Skip to content

zstd compressed debug sections are not parsed #5984

Closed
@trumank

Description

@trumank

Version and Platform (required):

  • Binary Ninja Version: 4.2.6168-dev Personal, cb0f14d8
  • OS: arch
  • OS Version: unknown
  • CPU Architecture: x86_64

Bug Description:
Binary Ninja does not read/parse debug sections compressed with zstd.

Steps To Reproduce:

#include <iostream>
#include <ostream>
#include <string>

struct Test {
  std::string msg;
};

int main() {
  Test t{.msg = "Hello, World!"};
  std::cout << t.msg << std::endl;
  return 0;
}
g++ hello.cpp -g -fuse-ld=mold -Wl,--compress-debug-sections=zstd -o hello

Open hello in Binary Ninja and observe there is no struct named Test defined. Change the compression type to zlib or remove entirely and it will appear.

hello.zip

Additional Information:
I ran into this with my own tools using the object crate, perhaps related: gimli-rs/object#730

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions