[libc-commits] [PATCH] D82700: [libc] Setup TLS in x86_64 loader.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Aug 7 23:18:16 PDT 2020
sivachandra marked 3 inline comments as done.
sivachandra added inline comments.
================
Comment at: libc/loader/linux/x86_64/start.cpp:25
+
+#ifdef SYS_mmaps2
+static constexpr long mmapSyscallNumber = SYS_mmap2;
----------------
asteinhauser wrote:
> There should probably be SYS_mmap2 instead of SYS_mmaps2.
Good catch! Fixed.
================
Comment at: libc/loader/linux/x86_64/start.cpp:59
+ MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ if (mmapRetVal < 0 && static_cast<uintptr_t>(mmapRetVal) > -app.pageSize)
+ __llvm_libc::syscall(SYS_exit, 1);
----------------
asteinhauser wrote:
> Why "if (mmapRetVal == MAP_FAILED)" is not a sufficient check?
>
Added a comment to explain this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82700/new/
https://reviews.llvm.org/D82700
More information about the libc-commits
mailing list