ARM + ELF questions

Does anyone know if there is a way to distinguish which architecture (armv4, armv5, armv5t, armv6, armv7) ARM ELF files are?

The only thing I know of is the e_machine in the ELF header. I know ARM ELF files (.axf files) might have some special bits, but is there anything in linux that is adopted?

Greg Clayton
Senior LLDB Architect

Does anyone know if there is a way to distinguish which architecture (armv4, armv5, armv5t, armv6, armv7) ARM ELF files are?

The only thing I know of is the e_machine in the ELF header. I know ARM ELF files (.axf files) might have some special bits, but is there anything in linux that is adopted?

lookign at the ARM ELF spec [1], they list a (possibly example) build
attribute (p 20) called Tag_CPU_name:
Tag_CPU_name <string> -- 0x05, "ARM946E-S"

I'm not sure if thats useful, possibly another build attribute might
be more descriptive.

Bobby

[1] - Documentation – Arm Developer

Does anyone know if there is a way to distinguish which architecture (armv4, armv5, armv5t, armv6, armv7) ARM ELF files are?

The only thing I know of is the e_machine in the ELF header. I know ARM ELF files (.axf files) might have some special bits, but is there anything in linux that is adopted?

lookign at the ARM ELF spec [1], they list a (possibly example) build
attribute (p 20) called Tag_CPU_name:
Tag_CPU_name <string> -- 0x05, "ARM946E-S"

I'm not sure if thats useful, possibly another build attribute might
be more descriptive.

...

[1] - Documentation – Arm Developer

Take a look at ARMAsmPrinter::EmitStartOfAsmFile() in
llvm/lib/Target/ARM/ARMAsmPrinter.cpp to see how these attributes are
currently being set by LLVM.

deep