[LLVMdev] Does LLVM sign ARM ELFs?

Renato Golin rengolin at systemcall.org
Tue Nov 20 01:06:09 PST 2012


On 20 November 2012 03:22, Greg Fitzgerald <garious at gmail.com> wrote:
> I read through "ELF for the ARM Architecture" and my best guess has
> been to inspect .ARM.attributes in the elf-dump's section data, but
> both LLVM and GCC use "aeabi" for the vendor name.

"aeabi" is the "pseudo-vendor" which is normally printed to the
attributes section. There could be more vendor tags, and LLVM could
easily do that.

>From the ABI:

We expect a dot-ARM-dot-attributes section in a relocatable file will
most typically contain one vendor subsection
from the "aeabi" pseudo-vendor and possibly one from the generating
tool chain (e.g. "ARM", "gnu", "WRS", etc).

Amara,

Maybe another thing to add to your attributes patch, adding some
vendor specific info to it (like clang/version, llvm/version,
integrated-as, etc)?


> I've found several ways to distinguish the two (such as a magic number
> where GCC uses ELFOSABI_SYSV and LLVM uses ELFOSABI_LINUX), but hoping
> for something more reliable, like a toolchain signature.

I wouldn't rely on that.

I'm not sure what's your objective, but in the past when I had to test
separate binaries generated from integrated-as and compare to GAS
generated objects I just had different names for the objects in the
Makefile. If you don't control the source, however, might prove a
little more difficult.

--
cheers,
--renato

http://systemcall.org/



More information about the llvm-dev mailing list