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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 01:46:36 PST 2025


jh7370 wrote:

Do any existing llvm-objcopy lit tests fail, if you try and put the lit tests on your sambafs, like you do with `lib.a`. My working theory is that the in-place mechanism doesn't work across this kind of unusual setup, but I can't be sure.

> 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 objcopy cannot use it because lib.a is open by objcopy itself.

It would be really helpful if you could debug the code and identify where the actual failure point is within llvm-objcopy, i.e. what call is it that produces the error, as I don't get the impression you actually know (and I can't debug the setup for you, because I don't have the same filesystem setup).

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


More information about the llvm-commits mailing list