[PATCH] D67090: [llvm-objcopy][llvm-strip] Support --only-keep-debug

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 09:19:07 PDT 2019


MaskRay abandoned this revision.
MaskRay added a comment.

Abandoning this one in favor of D67137 <https://reviews.llvm.org/D67137>. My original plan is to split the functionality into 2 parts, this patch is the first step (no program headers), which should work for most consumers of separate debug files, while the second step (D67137 <https://reviews.llvm.org/D67137>) adds the program headers back and rewrites p_offset/p_filesz fields. In an ideal world we do not need step 2, but ChromeOS developers said that symbolization with Linux perf without access to the original executable requires some mechanism mapping file offsets back to VAddr. I haven't dug into the detail but this issue is further complicated by dlopen_with_offset (ELF header may not be at offset 0!) that may be the case on Android (it may not use this term but I've seen this internally in Google, though it may not have such symbolization use cases)...  My feeling is that we have to do something similar to GNU objcopy --only-keep-debug in one step, D67137 <https://reviews.llvm.org/D67137>...


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67090





More information about the llvm-commits mailing list