Description
Rust .rlib
archive files contains object files and .rmeta
files. Tools for working with .rlib
file has been requested for several years but there's still no work on it yet. (rust-lang/rust#25820)
Most of the commands like nm
, objdump
, etc. work on .rlib
file, although there is an error message about unrecognized format of .rmeta
files. objcopy
is one of them, and commands like objcopy -W foo libxxx.rlib
still work, even though it complains about unrecognized .rmeta
file.
But it seems that llvm-objcopy
does not commit the changes to .rlib
files if an error occurs.
I don't know if the policy is to mimic GNU tools' behavior, but it would be a lot more convenient if llvm-objcopy
would behave similarly to objcopy
in cases like this, provided that the side-effects caused by this change is expected to be small.
Otherwise, I have to extract the archive, apply the change to individual object files, and recreate the archive.