Script/Tool predicate for ARM ELF compiled for Thumb OR Arm

前端 未结 2 820
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 10:25

I have rootfs and klibc file systems. I am creating make rules and some developers have an older compiler without inter-netwo

2条回答
  •  粉色の甜心
    2020-12-11 10:34

    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.

提交回复
热议问题