[PATCH] D43475: [llvm-objcopy] Implement --only-keep-debug

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 18:56:50 PST 2018


jakehehrlich added a comment.

So in my cursory findings I have confirmed that prelinking is a known use case for this. Also the fact that debuggers emit warnings on this is reason enough to not accept this sort of change. It seems like there should in theory be ways to make something like this work but it would a) need debugger support and b) would need a design proposal. I'm happy to participate in new inventions but we can't just make --only-keep-debug do something which is known to behave differently from GNU objcopy in ways that are trivially visible.

So the basic method here will have to be rejected. Paths to resolve this include at least the following:

1. Propose a new standard for how debugging information should be collected by the debugger. Get community approval. Decide on a new flag name, and implement that.
2. Modify llvm-objcopy to properly handle the conversion to nobits. I think this can now be done more simply by not performing the conversion in memory but instead laying out the file differently and writing out the section header table a bit differently.


Repository:
  rL LLVM

https://reviews.llvm.org/D43475





More information about the llvm-commits mailing list