[llvm] [ARM, ELF] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR #70014)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 19:39:54 PDT 2023
MaskRay wrote:
I have tested that this patch does not change code generation for the following configurations:
https://gist.github.com/MaskRay/927d715e190617f8d8a2a066893705e3
```
#!/bin/zsh
CC=/tmp/Rel/bin/clang
if [[ -n $1 ]]; then
update=1
echo updated
else
update=
fi
[[ ! -e a.cc ]] && echo 'void bar(char *); void foo() { char a[200]; bar(a); }' > a.cc
run() {
if [[ -n $update ]]; then
$CC "${@:2}" -S -fstack-protector a.cc -o $1.s
else
$CC "${@:2}" -S -fstack-protector a.cc -o - | diff -u $1.s -
fi
}
run arm.linux.nopic --target=arm-linux-gnueabi -fno-pic
run arm.linux.pie --target=arm-linux-gnueabi -fpie
run arm.linux.pic --target=arm-linux-gnueabi -fpic
run armv6.darwin.nopic --target=armv6-apple-darwin -fno-pic
run armv6.darwin.dynamicnopic --target=armv6-apple-darwin -mdynamic-no-pic
run armv6.darwin.pic --target=armv6-apple-darwin -fpic
run armv7.darwin.nopic --target=armv7-apple-darwin -mcpu=cortex-a8 -fno-pic
run armv7.darwin.dynamicnopic --target=armv7-apple-darwin -mcpu=cortex-a8 -mdynamic-no-pic
run armv7.darwin.pic --target=armv7-apple-darwin -mcpu=cortex-a8 -fpic
run arm64.darwin.pic --target=arm64-apple-darwin
```
https://github.com/llvm/llvm-project/pull/70014
More information about the llvm-commits
mailing list