I have rootfs and klibc file systems. I am creating make
rules and some developers have an older compiler without inter-netwo
Since thumb and arm sequences can be freely interchanged within an object file, even within the same section, plain ELF header inspection is not going to help you whether a file includes Thumb instructions or not.
A slightly roundabout and still not 100% foolproof way would be to use readelf -r
and check if the output contains "R_ARM_THM", indicating a relocation for thumb.