[PATCH] D40523: [llvm-objcopy] Add --only-keep-debug

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 17:24:20 PST 2017


jakehehrlich added a comment.

So I spoke with Roland McGrath about what should be happening with the program headers and it's kind of strange. Basically they should be kept exactly as is but that shouldn't mean that all that space is consumed because of them which demands a more complex change that I desired. The program headers are sometimes needed to match the contents due to prelink.

This presents a complication because right now segments are always laid out where as in this case we really should just ignore their existence and output them without considering them during layout. It feels a bit hacky but I suppose we can add a boolean flag for "ignore program headers during layout". Honestly the whole behavoir of --only-keep-debug is quite exceptional; it dosn't really like obeying the rules.


Repository:
  rL LLVM

https://reviews.llvm.org/D40523





More information about the llvm-commits mailing list