RFC: readelf: Explain why LLVM bitcode files cannot be read

Nick Clifton nickc@redhat.com
Mon Aug 22 10:18:09 GMT 2022

Hi Jeff,

> I think the same issue arises with golang -- its .o files are not ELF, but can be read by the golang variants of objdump, nm, etc. So you might want to look at doing 
> something similar for golang as well.

A great idea.  I have recoded the patch to create a new function
which checks the magic number, and if it is not ELF then it tests
for LLVM bitcode files and golang object files.  This time I have
put the magic numbers into a static array, so it should be easy to
add more sequences should we wish to do so.


More information about the Binutils mailing list