[PATCH] D91605: [sanitizers] Implement GetTls on Solaris
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 17:09:50 PST 2020
vitalybuka added a comment.
Other than file issue, compiler-rt part is LGTM
leaving the rest to @MaskRay
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:455-520
+#if SANITIZER_SOLARIS
+// dlpi_tls_modid is only available since Solaris 11.4 SRU 10. Use
+// dlinfo(RTLD_DI_LINKMAP) instead which works on both Solaris 11.3 and Illumos.
+
+// Beginning of declaration from OpenSolaris/Illumos
+// $SRC/cmd/sgs/include/rtld.h.
+typedef struct {
----------------
ro wrote:
> vitalybuka wrote:
> > can this go into sanitizer_platform_limits_solaris.h ?
> >
> I don't think it belongs there: AFAICS that header is for types used by the interceptors.
>
> I've been following what other targets do here, like declaring internal types and functions, and adding helpers like `GetSizeFromHdr`. It would only be confusing if Solaris were treated differently. It certainly helped me a lot being able to see what other targets do in once place.
Chech xdl_iterate_phdr and sanitizer_freebsd.h
I think it's better to move this into some sanitizer_solaris.h/cpp as well
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91605/new/
https://reviews.llvm.org/D91605
More information about the llvm-commits
mailing list