objcopy/strip of IR files and is_strip_input
Sam James
sam@gentoo.org
Mon Aug 11 10:45:21 GMT 2025
Alan Modra <amodra@gmail.com> writes:
I'll read over this and give it a go on my own testcases later.
> I question the need to objcopy LLVM bytecode files.
I find it dubious as well. We never hit the bug that Fedora reported
necessitating that (PR33198) because we use llvm-bitcode-strip if the LLVM
toolchain was used. Even if binutils ignores it, it's not doing what
people really want (removing the LLVM IR), so I don't see the point in
it (i.e. erroring out is probably doing people a service).
But we were close to release and I didn't want to argue (or risk my
beloved feature getting reverted).
I think what binutils does right now is OK, just not necessary.
>
> Another thing (not done in this patch): I think that both places where
> we do something special with lto_slim_ir_object can be removed too,
> but that causes
> FAIL: pr33246 with --strip-debug --enable-deterministic-archives (strip tmpdir/pr33246.o)
> due to strip-debug removing the FILE symbol but otherwise leaving the
> object file good. ie. the test is too restrictive IMO. Is it true
> that no one will ever want to manipulate slim IR files? (Apart from
> the currently allowed removal of all IR sections.)
I need to think about this bit and see what H.J. says as well.
thanks,
sam
More information about the Binutils
mailing list