[PATCH] D63807: [llvm-objcopy] Add --only-keep-debug for ELF

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 11:50:02 PDT 2019


jakehehrlich added a comment.

> My feeling is that segments are not important. The offsets of those NOBITS sections are not important. If segments are laid out weirdly after objcopy --only-keep-debug, I think it doesn't matter if llvm-objcopy also fails to layout the segments in a sensible way. The important thing here is that debuggers can correctly load debug info from such --only-keep-debug processed files. So I asked you test the workflow:

I'm unclear on why `sh_vaddr` can't be used to match up sections. I'm curious as to how debuggers actually do this. It would be great if we can just ignore everything I said previously and only output sections. There's a third even easier way to do this if that's possible. We can just synthesize a section only version and have it go though the normal code paths separately.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63807/new/

https://reviews.llvm.org/D63807





More information about the llvm-commits mailing list