[PATCH] D146463: [CodeGen][RISCV] Change Shadow Call Stack Register to X3
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 13:51:07 PDT 2023
jrtc27 added inline comments.
================
Comment at: clang/docs/ShadowCallStack.rst:157
+linker. This can be done with the ``--no-relax-gp`` flag in GNU ld. It may also
+be useful to compile with ``-msmall-data-limit=0``.
----------------
This doesn't really achieve anything other than not do one optimisation (which may or not matter; the grouping of small data may have a noticeable cache locality effect)
================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:573
+ Kinds & SanitizerKind::ShadowCallStack)
+ << "-msmall-data-limit=0";
+ }
----------------
Why is this an error? It may be a misguided thing to enable but it is 100% supported to combine this. All the limit does is put things in .sdata, but they can still be addressed just fine.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2072
if (Args.hasArg(options::OPT_G)) {
D.Diag(diag::warn_drv_unsupported_sdata);
}
----------------
If you're modelling it on this warning (note, not an error) then this is crap too, there are legitimate reasons to use -G with -fPIC (and the -shared handling is even more questionable).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146463/new/
https://reviews.llvm.org/D146463
More information about the llvm-commits
mailing list