Elevate .text.syscall to .privileged

It turns out adding OpenBSD msyscall() origin verification broke the
--ftrace flag. The executable needs to issue raw syscalls while it's
rewriting itself. So they need to be in the same section, and that's
just plain simpler too.
This commit is contained in:
Justine Tunney 2021-02-06 03:17:41 -08:00
parent d7733579d3
commit 9f149e1de3
19 changed files with 30 additions and 38 deletions

View file

@ -411,7 +411,7 @@ static const char *__asan_describe_access_poison(char *p) {
}
}
static textsyscall wontreturn void __asan_exit(int rc) {
static privileged noinline wontreturn void __asan_exit(int rc) {
if (!IsWindows()) {
asm volatile("syscall"
: /* no outputs */
@ -423,7 +423,7 @@ static textsyscall wontreturn void __asan_exit(int rc) {
}
}
static textsyscall ssize_t __asan_write(const void *data, size_t size) {
static privileged noinline ssize_t __asan_write(const void *data, size_t size) {
ssize_t rc;
uint32_t wrote;
if (!IsWindows()) {