japaric / cargo-call-stack

Whole program static stack analysis
Apache License 2.0
579 stars 52 forks source link

Does not work for ARMv6-M targets #20

Open therealprof opened 4 years ago

therealprof commented 4 years ago

In https://github.com/japaric/cargo-call-stack/blob/134f398457721ae315e78fd6b801594e7dea452a/src/thumb.rs#L123 the UDF instruction is only accepted for ARMv7-M but in reality it is (at least) also applicable to ARMv6-M.

If it is not allowed it will pretty much always trip on ARMv6-M binaries in https://github.com/japaric/cargo-call-stack/blob/134f398457721ae315e78fd6b801594e7dea452a/src/thumb.rs#L136

As far as I can see the right fix seems to remove the v7 check.