llvm-objcopy does not work on Rust .rlib
archive files
#53395
Labels
enhancement
Improving things as opposed to bug fixing, e.g. new or missing feature
rust
Rust language
tools:llvm-objcopy/strip
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 likeobjcopy -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 toobjcopy
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.
The text was updated successfully, but these errors were encountered: