[PATCH] D123821: [llvm-objcopy][NFC] refactor restoreStatOnFile out of llvm-objcopy.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 15:01:35 PDT 2022
avl added a comment.
In D123821#3452892 <https://reviews.llvm.org/D123821#3452892>, @MaskRay wrote:
>> Functionality of restoreStatOnFile may be reused.
>
> Do you have an impending usage? The functionality is to emulate in-place update of GNU strip/objcopy where "copy" in "objcopy" assumes some "cp" like behavior. This somewhat makes replacing GNU strip/objcopy easy.
>
> For many utilities, they probably shouldn't do this.
I would like to use it for the new utility - https://reviews.llvm.org/D86539#inline-1182993 . I think it would be good if the behavior would match with "objcopy". f.e. this utility might be used instead of
`llvm-objcopy` --only-keep-debug in-file out-file.debug
`llvm-objcopy` --strip-debug in-file out-file
`llvm-objcopy` --add-gnu-debuglink=out-file.debug out-file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123821/new/
https://reviews.llvm.org/D123821
More information about the llvm-commits
mailing list