Open
Description
demo.c
#include <string.h>
void func() {
char c = 'b';
char str1[1];
memset(str1, c, 1);
}
https://godbolt.org/z/TxKnEYdbP
compile command
% clang demo.c -c -o demo.o -fstack-protector-strong
% objdump -d demo.o | grep __stack_chk*
c: 90000008 adrp x8, 0 <__stack_chk_guard>
30: 90000008 adrp x8, 0 <__stack_chk_guard>
48: 94000000 bl 0 <__stack_chk_fail>
-------------------------------------------------------
% llvm-objdump -d demo.o | grep __stack_chk*
NULL
we can see that binutils objdump
can get __stack_chk* symbol, while llvm-objdump
can not.