[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:09:44 PST 2019
santagada added a comment.
In D59025#1420056 <https://reviews.llvm.org/D59025#1420056>, @rupprecht wrote:
> In D59025#1420039 <https://reviews.llvm.org/D59025#1420039>, @santagada wrote:
>
> > In D59025#1420024 <https://reviews.llvm.org/D59025#1420024>, @rupprecht wrote:
> >
> > > General question: why not just use llvm-objcopy --add-section to do this?
> >
> >
> > How? I need to compute the ghashes, how would I just add a section to it?
>
>
> --add-section adds a given file as a section name, e.g. assuming you have a separate script to compute hashes:
> ./compute_ghashes input.o > ghash.txt
> llvm-objcopy input.o --add-section .debug$H=ghash.txt
llvm-objcopy doesn't supoprt --add-section for coff, so this wouldn't be possible. Even if it was this is a clean way to add a section that is intended to follow the same format that lld expects and that clang generates.
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