Skip to content

Removing specific symbols from debug section #192

Answered by davea42
tex asked this question in Q&A
Discussion options

You must be logged in to vote

The simple answer is 'NO'.

DWARF is as compact as possible (depending on compiler-writer
choices) and that makes changing content challenging: Essentially reading it all in to a set of graphs
removing parts, and writing a new object file. Just removing stuff, or just setting blobs of bytes to zeros
will destroy the DWARF involved. The library cannot store or rewrite such graphs ( such was never part of its design).

One thing is doable though. In strings in the .debug_str section zeroing
out bytes will not destroy the DWARF, it will still be readable.

Altering non-null ASCII bytes in any string anywhere in DWARF to be any non-null
ASCII character (possibly the dot (.)) will not destroy the…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@tex
Comment options

Answer selected by davea42
Comment options

You must be logged in to vote
1 reply
@tex
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants