[llvm] [llvm-objcopy] fix llvm-objcopy replaced failed when the file is modified inplace (PR #121564)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 08:58:04 PST 2025


aokblast wrote:

The command is ``objcopy --redefine-syms={file} lib.a `` And it shows llvm-objcopy: lib.a not found. 
I just guess objcopy is trying to replace lib.a with temp file (generated by objcopy) and it cannot find it. 

The initial workaround for me before this patch after my guess is ``cat lib.a | objcopy --redefine-syms={file} - lib.a.redefined`` and all thing works.

We use CMake custom command to call objcopy in our build system.

https://github.com/llvm/llvm-project/pull/121564


More information about the llvm-commits mailing list