[PATCH] D59025: Add --add-ghashes to llvm-objcopy to append a .debug$H to coff objects

Leonardo Santagada via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 14:07:30 PST 2019


santagada added a comment.

In D59025#1420534 <https://reviews.llvm.org/D59025#1420534>, @mstorsjo wrote:

> In D59025#1420036 <https://reviews.llvm.org/D59025#1420036>, @santagada wrote:
>
> > Well, link.exe seems to get "confused" it doesn't print any error messages and produce a very big file that is not really an executable. Without any messages or symbols for it its a bit difficult to see what is happening. As I mostly did the same as the gnu-link option does, I guess those obj files should have the same problem.
>
>
> FWIW, the gnu debuglink feature is only used on executables, not on object files, and only in practice in mingw setups and read by GDB, so there might very well be things in that which confuses link.exe.


So adding an option just for lld should be ok as well... I would document on the help of --add-ghashes "(only supported by lld)"  at least until someone figures out what is tripping up link.exe because it really shouldn't be a problem. My old approach used old fields in the .debug$T header to point to a blob with the hashes at the end of the .obj file. Altough much more hacky it did not break link.exe at all. I would prefer to leave this as is as this doesn't require any changes to lld.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59025





More information about the llvm-commits mailing list