If cross-compilation is being performed, the build-bom process needs to use tools compatible with the cross-compilation ELF format. Prior to this change, it accepts a cmdline override for the objcopy tool to use, but was still using the standard objdump tool (to check if the llvm-bitcode section was already present in the ELF file). This change modifies it to use that same objcopy rather than objdump to perform the test. The alternative would be to allow/require the user to be able to override the objdump tool; this approach was chosen in favor of user simplicity.
If cross-compilation is being performed, the build-bom process needs to use tools compatible with the cross-compilation ELF format. Prior to this change, it accepts a cmdline override for the
objcopy
tool to use, but was still using the standardobjdump
tool (to check if the llvm-bitcode section was already present in the ELF file). This change modifies it to use that sameobjcopy
rather thanobjdump
to perform the test. The alternative would be to allow/require the user to be able to override theobjdump
tool; this approach was chosen in favor of user simplicity.