simon_tatham added a comment. > `-fsanitize=kcfi` only supports aarch64 and x86-64 now. riscv64 is on the > plan. > > % fclang -fsanitize=kcfi --traget=armv7-linux-gnueabi -c a.c > clang: error: unsupported option '--traget=armv7-linux-gnueabi'
Sorry to contradict, but that error message only indicates that you misspelled `--target`! With Peter's test source file, these two commands generate different object files, and as Peter says, the `-fsanitize=kcfi` one includes a load from offset −4 relative to a potentially odd-valued function pointer: clang -O1 --target=armv7-linux-gnueabi -c a.c # generates a bare BX r0 clang -O1 -fsanitize=kcfi --target=armv7-linux-gnueabi -c a.c # generates the code shown in Peter's example above Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151308/new/ https://reviews.llvm.org/D151308 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits