diff options
418 files changed, 711 insertions, 582 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index 9554e1892..3b6e3cbec 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -227,7 +227,6 @@ libc_bionic_src_files := \ bionic/unlink.cpp \ bionic/utimes.cpp \ bionic/vdso.cpp \ - bionic/vfork.cpp \ bionic/wait.cpp \ bionic/wchar.cpp \ bionic/wctype.cpp \ diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT index 128ec6bd0..38ae8310a 100644 --- a/libc/SYSCALLS.TXT +++ b/libc/SYSCALLS.TXT @@ -77,6 +77,7 @@ int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) arm,mips,x8 int setgroups:setgroups32(int, const gid_t*) arm,x86 int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64 int setpgid(pid_t, pid_t) all +pid_t vfork(void) arm int setregid:setregid32(gid_t, gid_t) arm,x86 int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64 int chroot(const char*) all diff --git a/libc/arch-arm/syscalls/vfork.S b/libc/arch-arm/syscalls/vfork.S new file mode 100644 index 000000000..e12fba55a --- /dev/null +++ b/libc/arch-arm/syscalls/vfork.S @@ -0,0 +1,14 @@ +/* Generated by gensyscalls.py. Do not edit. */ + +#include <private/bionic_asm.h> + +ENTRY(vfork) + mov ip, r7 + ldr r7, =__NR_vfork + swi #0 + mov r7, ip + cmn r0, #(MAX_ERRNO + 1) + bxls lr + neg r0, r0 + b __set_errno +END(vfork) diff --git a/libc/arch-arm64/arm64.mk b/libc/arch-arm64/arm64.mk index 314358e1f..ed991ce60 100644 --- a/libc/arch-arm64/arm64.mk +++ b/libc/arch-arm64/arm64.mk @@ -36,6 +36,7 @@ libc_bionic_src_files_arm64 := \ arch-arm64/bionic/__set_tls.c \ arch-arm64/bionic/sigsetjmp.S \ arch-arm64/bionic/syscall.S \ + arch-arm64/bionic/vfork.S \ libc_crt_target_cflags_arm64 := \ diff --git a/libc/arch-arm64/bionic/vfork.S b/libc/arch-arm64/bionic/vfork.S new file mode 100644 index 000000000..c70062317 --- /dev/null +++ b/libc/arch-arm64/bionic/vfork.S @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <private/bionic_asm.h> +#include <asm/signal.h> +#include <linux/sched.h> + +ENTRY(vfork) + mov x0, #(CLONE_VM | CLONE_VFORK | SIGCHLD) + mov x1, xzr + mov x2, xzr + mov x3, xzr + mov x4, xzr + + mov x8, __NR_clone + svc #0 + + cmn x0, #(MAX_ERRNO + 1) + cneg x0, x0, hi + b.hi __set_errno + + ret +END(vfork) diff --git a/libc/arch-mips/bionic/vfork.S b/libc/arch-mips/bionic/vfork.S new file mode 100644 index 000000000..96de69e20 --- /dev/null +++ b/libc/arch-mips/bionic/vfork.S @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <private/bionic_asm.h> +#include <linux/sched.h> + +// TODO: mips' uapi signal.h is missing #ifndef __ASSEMBLY__. +// #include <asm/signal.h> +#define SIGCHLD 18 + +ENTRY(vfork) + .set noreorder + .cpload t9 + + li a0, (CLONE_VM | CLONE_VFORK | SIGCHLD) + li a1, 0 + li a2, 0 + li a3, 0 + subu sp, 8 + sw $0, 16(sp) + li v0, __NR_clone + syscall + addu sp, 8 + bnez a3, 1f + move a0, v0 + + j ra + nop +1: + la t9, __set_errno + j t9 + nop +END(vfork) diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk index bf3b8ae00..8e415f957 100644 --- a/libc/arch-mips/mips.mk +++ b/libc/arch-mips/mips.mk @@ -59,6 +59,7 @@ libc_bionic_src_files_mips += \ arch-mips/bionic/setjmp.S \ arch-mips/bionic/sigsetjmp.S \ arch-mips/bionic/syscall.S \ + arch-mips/bionic/vfork.S \ ifndef ARCH_MIPS_REV6 libc_bionic_src_files_mips += \ diff --git a/libc/arch-mips64/bionic/vfork.S b/libc/arch-mips64/bionic/vfork.S new file mode 100644 index 000000000..911a264f2 --- /dev/null +++ b/libc/arch-mips64/bionic/vfork.S @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <private/bionic_asm.h> +#include <linux/sched.h> + +// TODO: mips' uapi signal.h is missing #ifndef __ASSEMBLY__. +// #include <asm/signal.h> +#define SIGCHLD 18 + + .text + +#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32) +FRAMESZ = MKFSIZ(5,0) +#else +FRAMESZ = MKFSIZ(0,0) +#endif + +LEAF(vfork,FRAMESZ) +#if FRAMESZ!=0 + PTR_SUBU sp, FRAMESZ +#endif + SETUP_GP64(a5, vfork) + LI a0, (CLONE_VM | CLONE_VFORK | SIGCHLD) + move a1, $0 + move a2, $0 + move a3, $0 +#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32) + REG_S $0, 4*REGSZ(sp) +#else + move a4, $0 +#endif + LI v0, __NR_clone + syscall +#if FRAMESZ!=0 + PTR_ADDU sp,FRAMESZ +#endif + move a0, v0 + bnez a3, 1f + RESTORE_GP64 + j ra +1: + LA t9,__set_errno + RESTORE_GP64 + j t9 + END(vfork) diff --git a/libc/arch-mips64/mips64.mk b/libc/arch-mips64/mips64.mk index 6f7a928b1..230cb26c5 100644 --- a/libc/arch-mips64/mips64.mk +++ b/libc/arch-mips64/mips64.mk @@ -46,6 +46,7 @@ libc_bionic_src_files_mips64 := \ arch-mips64/bionic/setjmp.S \ arch-mips64/bionic/sigsetjmp.S \ arch-mips64/bionic/syscall.S \ + arch-mips64/bionic/vfork.S \ # FIXME TODO ## libc_bionic_src_files_mips64 += arch-mips64/string/memcpy.S diff --git a/libc/arch-x86/bionic/__bionic_clone.S b/libc/arch-x86/bionic/__bionic_clone.S index 917dc6883..900ea4058 100644 --- a/libc/arch-x86/bionic/__bionic_clone.S +++ b/libc/arch-x86/bionic/__bionic_clone.S @@ -32,7 +32,7 @@ ENTRY(__bionic_clone) # An error occurred, so set errno and return -1. negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp jmp .L_bc_return diff --git a/libc/arch-x86/bionic/__stack_chk_fail_local.h b/libc/arch-x86/bionic/__stack_chk_fail_local.h index 4f3699a35..0b0fd7f8b 100644 --- a/libc/arch-x86/bionic/__stack_chk_fail_local.h +++ b/libc/arch-x86/bionic/__stack_chk_fail_local.h @@ -26,6 +26,7 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> /* __stack_chk_fail routine is runtime part of stack protector compiler @@ -48,13 +49,9 @@ */ #ifdef __i386__ -#ifdef __PIC__ extern void __stack_chk_fail(); -__attribute__ ((visibility ("hidden"))) -void __stack_chk_fail_local() -{ +__LIBC_HIDDEN__ void __stack_chk_fail_local() { __stack_chk_fail(); } #endif -#endif diff --git a/libc/arch-x86/bionic/setjmp.S b/libc/arch-x86/bionic/setjmp.S index 5b943118c..8f9d67c23 100644 --- a/libc/arch-x86/bionic/setjmp.S +++ b/libc/arch-x86/bionic/setjmp.S @@ -46,11 +46,7 @@ ENTRY(setjmp) PIC_PROLOGUE pushl $0 -#ifdef PIC call PIC_PLT(sigblock) -#else - call sigblock -#endif addl $4,%esp PIC_EPILOGUE @@ -71,11 +67,7 @@ ENTRY(longjmp) movl 4(%esp),%edx PIC_PROLOGUE pushl 24(%edx) -#ifdef PIC call PIC_PLT(sigsetmask) -#else - call sigsetmask -#endif addl $4,%esp PIC_EPILOGUE diff --git a/libc/arch-x86/bionic/sigsetjmp.S b/libc/arch-x86/bionic/sigsetjmp.S index 7ef732ef2..250c606d7 100644 --- a/libc/arch-x86/bionic/sigsetjmp.S +++ b/libc/arch-x86/bionic/sigsetjmp.S @@ -42,11 +42,7 @@ ENTRY(sigsetjmp) PIC_PROLOGUE pushl $0 -#ifdef PIC call PIC_PLT(sigblock) -#else - call sigblock -#endif addl $4,%esp PIC_EPILOGUE @@ -70,11 +66,7 @@ ENTRY(siglongjmp) PIC_PROLOGUE pushl 24(%edx) -#ifdef PIC call PIC_PLT(sigsetmask) -#else - call sigsetmask -#endif addl $4,%esp PIC_EPILOGUE diff --git a/libc/arch-x86/bionic/syscall.S b/libc/arch-x86/bionic/syscall.S index 8e76c4ee7..21391002b 100644 --- a/libc/arch-x86/bionic/syscall.S +++ b/libc/arch-x86/bionic/syscall.S @@ -38,7 +38,7 @@ ENTRY(syscall) # Yes, so set errno. negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: # Restore the callee save registers. diff --git a/libc/arch-x86/bionic/vfork.S b/libc/arch-x86/bionic/vfork.S new file mode 100644 index 000000000..91453f14d --- /dev/null +++ b/libc/arch-x86/bionic/vfork.S @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <private/bionic_asm.h> + +// This custom code preserves the return address across the system call. + +ENTRY(vfork) + popl %ecx // Grab the return address. + movl $__NR_vfork, %eax + int $0x80 + cmpl $-MAX_ERRNO, %eax + jb 1f + negl %eax + pushl %eax + call PIC_PLT(__set_errno) +1: + jmp *%ecx // Jump to the stored return address. +END(vfork) diff --git a/libc/arch-x86/include/machine/asm.h b/libc/arch-x86/include/machine/asm.h index 913e6c840..bf77525ee 100644 --- a/libc/arch-x86/include/machine/asm.h +++ b/libc/arch-x86/include/machine/asm.h @@ -37,7 +37,6 @@ #ifndef _I386_ASM_H_ #define _I386_ASM_H_ -#ifdef PIC #define PIC_PROLOGUE \ pushl %ebx; \ call 1f; \ @@ -49,13 +48,6 @@ #define PIC_PLT(x) x@PLT #define PIC_GOT(x) x@GOT(%ebx) #define PIC_GOTOFF(x) x@GOTOFF(%ebx) -#else -#define PIC_PROLOGUE -#define PIC_EPILOGUE -#define PIC_PLT(x) x -#define PIC_GOT(x) x -#define PIC_GOTOFF(x) x -#endif /* let kernels and others override entrypoint alignment */ #if !defined(_ALIGN_TEXT) && !defined(_KERNEL) diff --git a/libc/arch-x86/syscalls/__accept4.S b/libc/arch-x86/syscalls/__accept4.S index 2d9cc423c..4fdb854f9 100644 --- a/libc/arch-x86/syscalls/__accept4.S +++ b/libc/arch-x86/syscalls/__accept4.S @@ -18,7 +18,7 @@ ENTRY(__accept4) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__brk.S b/libc/arch-x86/syscalls/__brk.S index 632dfcf7a..6039be1be 100644 --- a/libc/arch-x86/syscalls/__brk.S +++ b/libc/arch-x86/syscalls/__brk.S @@ -13,7 +13,7 @@ ENTRY(__brk) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__connect.S b/libc/arch-x86/syscalls/__connect.S index 5ee4fbf7f..5263f2da9 100644 --- a/libc/arch-x86/syscalls/__connect.S +++ b/libc/arch-x86/syscalls/__connect.S @@ -18,7 +18,7 @@ ENTRY(__connect) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__epoll_pwait.S b/libc/arch-x86/syscalls/__epoll_pwait.S index 641ca6d63..132bcf113 100644 --- a/libc/arch-x86/syscalls/__epoll_pwait.S +++ b/libc/arch-x86/syscalls/__epoll_pwait.S @@ -33,7 +33,7 @@ ENTRY(__epoll_pwait) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebp diff --git a/libc/arch-x86/syscalls/__exit.S b/libc/arch-x86/syscalls/__exit.S index 8578f56c5..287fb383e 100644 --- a/libc/arch-x86/syscalls/__exit.S +++ b/libc/arch-x86/syscalls/__exit.S @@ -13,7 +13,7 @@ ENTRY(__exit) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__fcntl64.S b/libc/arch-x86/syscalls/__fcntl64.S index ef58d15e7..adee16f99 100644 --- a/libc/arch-x86/syscalls/__fcntl64.S +++ b/libc/arch-x86/syscalls/__fcntl64.S @@ -21,7 +21,7 @@ ENTRY(__fcntl64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__fstatfs64.S b/libc/arch-x86/syscalls/__fstatfs64.S index 0ca33606a..7c277eeb1 100644 --- a/libc/arch-x86/syscalls/__fstatfs64.S +++ b/libc/arch-x86/syscalls/__fstatfs64.S @@ -21,7 +21,7 @@ ENTRY(__fstatfs64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__getcpu.S b/libc/arch-x86/syscalls/__getcpu.S index b181877f8..327335cfc 100644 --- a/libc/arch-x86/syscalls/__getcpu.S +++ b/libc/arch-x86/syscalls/__getcpu.S @@ -21,7 +21,7 @@ ENTRY(__getcpu) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__getcwd.S b/libc/arch-x86/syscalls/__getcwd.S index b71ba0de1..10c2f6c05 100644 --- a/libc/arch-x86/syscalls/__getcwd.S +++ b/libc/arch-x86/syscalls/__getcwd.S @@ -17,7 +17,7 @@ ENTRY(__getcwd) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__getdents64.S b/libc/arch-x86/syscalls/__getdents64.S index 3fc8719eb..c4e259bea 100644 --- a/libc/arch-x86/syscalls/__getdents64.S +++ b/libc/arch-x86/syscalls/__getdents64.S @@ -21,7 +21,7 @@ ENTRY(__getdents64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__getpid.S b/libc/arch-x86/syscalls/__getpid.S index f138d2f88..89f94847a 100644 --- a/libc/arch-x86/syscalls/__getpid.S +++ b/libc/arch-x86/syscalls/__getpid.S @@ -9,7 +9,7 @@ ENTRY(__getpid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/__getpriority.S b/libc/arch-x86/syscalls/__getpriority.S index 103431d26..d216a9f4e 100644 --- a/libc/arch-x86/syscalls/__getpriority.S +++ b/libc/arch-x86/syscalls/__getpriority.S @@ -17,7 +17,7 @@ ENTRY(__getpriority) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__ioctl.S b/libc/arch-x86/syscalls/__ioctl.S index 99d2d2c76..bcfd3216b 100644 --- a/libc/arch-x86/syscalls/__ioctl.S +++ b/libc/arch-x86/syscalls/__ioctl.S @@ -21,7 +21,7 @@ ENTRY(__ioctl) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__llseek.S b/libc/arch-x86/syscalls/__llseek.S index 0cdb98aa1..39ab7490e 100644 --- a/libc/arch-x86/syscalls/__llseek.S +++ b/libc/arch-x86/syscalls/__llseek.S @@ -29,7 +29,7 @@ ENTRY(__llseek) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/__mmap2.S b/libc/arch-x86/syscalls/__mmap2.S index 47131efee..f82142368 100644 --- a/libc/arch-x86/syscalls/__mmap2.S +++ b/libc/arch-x86/syscalls/__mmap2.S @@ -33,7 +33,7 @@ ENTRY(__mmap2) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebp diff --git a/libc/arch-x86/syscalls/__openat.S b/libc/arch-x86/syscalls/__openat.S index aec10e585..acdd5adad 100644 --- a/libc/arch-x86/syscalls/__openat.S +++ b/libc/arch-x86/syscalls/__openat.S @@ -25,7 +25,7 @@ ENTRY(__openat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__ppoll.S b/libc/arch-x86/syscalls/__ppoll.S index 92197b73c..a968965d1 100644 --- a/libc/arch-x86/syscalls/__ppoll.S +++ b/libc/arch-x86/syscalls/__ppoll.S @@ -29,7 +29,7 @@ ENTRY(__ppoll) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/__pselect6.S b/libc/arch-x86/syscalls/__pselect6.S index 38402f02d..c147bb53a 100644 --- a/libc/arch-x86/syscalls/__pselect6.S +++ b/libc/arch-x86/syscalls/__pselect6.S @@ -33,7 +33,7 @@ ENTRY(__pselect6) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebp diff --git a/libc/arch-x86/syscalls/__ptrace.S b/libc/arch-x86/syscalls/__ptrace.S index cea5847fe..c9a1bfd81 100644 --- a/libc/arch-x86/syscalls/__ptrace.S +++ b/libc/arch-x86/syscalls/__ptrace.S @@ -25,7 +25,7 @@ ENTRY(__ptrace) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__reboot.S b/libc/arch-x86/syscalls/__reboot.S index 454699421..3dbbb2514 100644 --- a/libc/arch-x86/syscalls/__reboot.S +++ b/libc/arch-x86/syscalls/__reboot.S @@ -25,7 +25,7 @@ ENTRY(__reboot) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__rt_sigaction.S b/libc/arch-x86/syscalls/__rt_sigaction.S index bfbe5baa4..3da8caeda 100644 --- a/libc/arch-x86/syscalls/__rt_sigaction.S +++ b/libc/arch-x86/syscalls/__rt_sigaction.S @@ -25,7 +25,7 @@ ENTRY(__rt_sigaction) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__rt_sigpending.S b/libc/arch-x86/syscalls/__rt_sigpending.S index dac478a64..99e43ec0c 100644 --- a/libc/arch-x86/syscalls/__rt_sigpending.S +++ b/libc/arch-x86/syscalls/__rt_sigpending.S @@ -17,7 +17,7 @@ ENTRY(__rt_sigpending) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__rt_sigprocmask.S b/libc/arch-x86/syscalls/__rt_sigprocmask.S index f1123603b..f3cda1f40 100644 --- a/libc/arch-x86/syscalls/__rt_sigprocmask.S +++ b/libc/arch-x86/syscalls/__rt_sigprocmask.S @@ -25,7 +25,7 @@ ENTRY(__rt_sigprocmask) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__rt_sigsuspend.S b/libc/arch-x86/syscalls/__rt_sigsuspend.S index ef505c097..f5a67046a 100644 --- a/libc/arch-x86/syscalls/__rt_sigsuspend.S +++ b/libc/arch-x86/syscalls/__rt_sigsuspend.S @@ -17,7 +17,7 @@ ENTRY(__rt_sigsuspend) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__rt_sigtimedwait.S b/libc/arch-x86/syscalls/__rt_sigtimedwait.S index d19c7dbdb..621173fd3 100644 --- a/libc/arch-x86/syscalls/__rt_sigtimedwait.S +++ b/libc/arch-x86/syscalls/__rt_sigtimedwait.S @@ -25,7 +25,7 @@ ENTRY(__rt_sigtimedwait) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__sched_getaffinity.S b/libc/arch-x86/syscalls/__sched_getaffinity.S index e7cb8f1c5..fe0b2f6c1 100644 --- a/libc/arch-x86/syscalls/__sched_getaffinity.S +++ b/libc/arch-x86/syscalls/__sched_getaffinity.S @@ -21,7 +21,7 @@ ENTRY(__sched_getaffinity) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__set_thread_area.S b/libc/arch-x86/syscalls/__set_thread_area.S index dda23a0d0..c67e6e48a 100644 --- a/libc/arch-x86/syscalls/__set_thread_area.S +++ b/libc/arch-x86/syscalls/__set_thread_area.S @@ -13,7 +13,7 @@ ENTRY(__set_thread_area) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__set_tid_address.S b/libc/arch-x86/syscalls/__set_tid_address.S index 1566d9a3e..f7ccc3a4f 100644 --- a/libc/arch-x86/syscalls/__set_tid_address.S +++ b/libc/arch-x86/syscalls/__set_tid_address.S @@ -13,7 +13,7 @@ ENTRY(__set_tid_address) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__sigaction.S b/libc/arch-x86/syscalls/__sigaction.S index f1a51d2eb..bf46472b0 100644 --- a/libc/arch-x86/syscalls/__sigaction.S +++ b/libc/arch-x86/syscalls/__sigaction.S @@ -21,7 +21,7 @@ ENTRY(__sigaction) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__signalfd4.S b/libc/arch-x86/syscalls/__signalfd4.S index 335e20627..2241fa8bf 100644 --- a/libc/arch-x86/syscalls/__signalfd4.S +++ b/libc/arch-x86/syscalls/__signalfd4.S @@ -25,7 +25,7 @@ ENTRY(__signalfd4) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__socket.S b/libc/arch-x86/syscalls/__socket.S index 368680f36..c36fde103 100644 --- a/libc/arch-x86/syscalls/__socket.S +++ b/libc/arch-x86/syscalls/__socket.S @@ -18,7 +18,7 @@ ENTRY(__socket) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__statfs64.S b/libc/arch-x86/syscalls/__statfs64.S index 6bb9d993c..76023aadb 100644 --- a/libc/arch-x86/syscalls/__statfs64.S +++ b/libc/arch-x86/syscalls/__statfs64.S @@ -21,7 +21,7 @@ ENTRY(__statfs64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__timer_create.S b/libc/arch-x86/syscalls/__timer_create.S index 3d28ae90b..7de433f39 100644 --- a/libc/arch-x86/syscalls/__timer_create.S +++ b/libc/arch-x86/syscalls/__timer_create.S @@ -21,7 +21,7 @@ ENTRY(__timer_create) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/__timer_delete.S b/libc/arch-x86/syscalls/__timer_delete.S index 7d64d6d44..b96de3b2f 100644 --- a/libc/arch-x86/syscalls/__timer_delete.S +++ b/libc/arch-x86/syscalls/__timer_delete.S @@ -13,7 +13,7 @@ ENTRY(__timer_delete) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__timer_getoverrun.S b/libc/arch-x86/syscalls/__timer_getoverrun.S index cb3776533..ae44926c0 100644 --- a/libc/arch-x86/syscalls/__timer_getoverrun.S +++ b/libc/arch-x86/syscalls/__timer_getoverrun.S @@ -13,7 +13,7 @@ ENTRY(__timer_getoverrun) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/__timer_gettime.S b/libc/arch-x86/syscalls/__timer_gettime.S index 5c43f4a10..4c2cbfc07 100644 --- a/libc/arch-x86/syscalls/__timer_gettime.S +++ b/libc/arch-x86/syscalls/__timer_gettime.S @@ -17,7 +17,7 @@ ENTRY(__timer_gettime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/__timer_settime.S b/libc/arch-x86/syscalls/__timer_settime.S index da7c58715..054112814 100644 --- a/libc/arch-x86/syscalls/__timer_settime.S +++ b/libc/arch-x86/syscalls/__timer_settime.S @@ -25,7 +25,7 @@ ENTRY(__timer_settime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/__waitid.S b/libc/arch-x86/syscalls/__waitid.S index 7e3ecdd9f..fb8416f0b 100644 --- a/libc/arch-x86/syscalls/__waitid.S +++ b/libc/arch-x86/syscalls/__waitid.S @@ -29,7 +29,7 @@ ENTRY(__waitid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/_exit.S b/libc/arch-x86/syscalls/_exit.S index 36e884a6a..31af9059b 100644 --- a/libc/arch-x86/syscalls/_exit.S +++ b/libc/arch-x86/syscalls/_exit.S @@ -13,7 +13,7 @@ ENTRY(_exit) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/acct.S b/libc/arch-x86/syscalls/acct.S index a0361145b..a19595f8d 100644 --- a/libc/arch-x86/syscalls/acct.S +++ b/libc/arch-x86/syscalls/acct.S @@ -13,7 +13,7 @@ ENTRY(acct) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/bind.S b/libc/arch-x86/syscalls/bind.S index ab5a29e7e..e45b4418b 100644 --- a/libc/arch-x86/syscalls/bind.S +++ b/libc/arch-x86/syscalls/bind.S @@ -18,7 +18,7 @@ ENTRY(bind) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/capget.S b/libc/arch-x86/syscalls/capget.S index 5441e4906..9790f1847 100644 --- a/libc/arch-x86/syscalls/capget.S +++ b/libc/arch-x86/syscalls/capget.S @@ -17,7 +17,7 @@ ENTRY(capget) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/capset.S b/libc/arch-x86/syscalls/capset.S index d04e4119e..a5bd09459 100644 --- a/libc/arch-x86/syscalls/capset.S +++ b/libc/arch-x86/syscalls/capset.S @@ -17,7 +17,7 @@ ENTRY(capset) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/chdir.S b/libc/arch-x86/syscalls/chdir.S index d32a0bdef..d27f289e4 100644 --- a/libc/arch-x86/syscalls/chdir.S +++ b/libc/arch-x86/syscalls/chdir.S @@ -13,7 +13,7 @@ ENTRY(chdir) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/chroot.S b/libc/arch-x86/syscalls/chroot.S index 63d7e00ab..18bd1d957 100644 --- a/libc/arch-x86/syscalls/chroot.S +++ b/libc/arch-x86/syscalls/chroot.S @@ -13,7 +13,7 @@ ENTRY(chroot) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/clock_getres.S b/libc/arch-x86/syscalls/clock_getres.S index 321299c35..1ce61efe6 100644 --- a/libc/arch-x86/syscalls/clock_getres.S +++ b/libc/arch-x86/syscalls/clock_getres.S @@ -17,7 +17,7 @@ ENTRY(clock_getres) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/clock_gettime.S b/libc/arch-x86/syscalls/clock_gettime.S index 54f769aff..73c51af31 100644 --- a/libc/arch-x86/syscalls/clock_gettime.S +++ b/libc/arch-x86/syscalls/clock_gettime.S @@ -17,7 +17,7 @@ ENTRY(clock_gettime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/clock_nanosleep.S b/libc/arch-x86/syscalls/clock_nanosleep.S index ca961c0ea..357396226 100644 --- a/libc/arch-x86/syscalls/clock_nanosleep.S +++ b/libc/arch-x86/syscalls/clock_nanosleep.S @@ -25,7 +25,7 @@ ENTRY(clock_nanosleep) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/clock_settime.S b/libc/arch-x86/syscalls/clock_settime.S index ab8c43e7a..35f79eb18 100644 --- a/libc/arch-x86/syscalls/clock_settime.S +++ b/libc/arch-x86/syscalls/clock_settime.S @@ -17,7 +17,7 @@ ENTRY(clock_settime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/close.S b/libc/arch-x86/syscalls/close.S index 0b3e73ab7..9ea61d4d5 100644 --- a/libc/arch-x86/syscalls/close.S +++ b/libc/arch-x86/syscalls/close.S @@ -13,7 +13,7 @@ ENTRY(close) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/delete_module.S b/libc/arch-x86/syscalls/delete_module.S index 757c8c1b9..d2515f871 100644 --- a/libc/arch-x86/syscalls/delete_module.S +++ b/libc/arch-x86/syscalls/delete_module.S @@ -17,7 +17,7 @@ ENTRY(delete_module) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/dup.S b/libc/arch-x86/syscalls/dup.S index 64e1538e5..81542c14f 100644 --- a/libc/arch-x86/syscalls/dup.S +++ b/libc/arch-x86/syscalls/dup.S @@ -13,7 +13,7 @@ ENTRY(dup) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/dup3.S b/libc/arch-x86/syscalls/dup3.S index a0ecd1942..d0dfb5b53 100644 --- a/libc/arch-x86/syscalls/dup3.S +++ b/libc/arch-x86/syscalls/dup3.S @@ -21,7 +21,7 @@ ENTRY(dup3) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/epoll_create1.S b/libc/arch-x86/syscalls/epoll_create1.S index 5b6a1baa2..23feb05ab 100644 --- a/libc/arch-x86/syscalls/epoll_create1.S +++ b/libc/arch-x86/syscalls/epoll_create1.S @@ -13,7 +13,7 @@ ENTRY(epoll_create1) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/epoll_ctl.S b/libc/arch-x86/syscalls/epoll_ctl.S index 3fd8acd3c..ac6405c15 100644 --- a/libc/arch-x86/syscalls/epoll_ctl.S +++ b/libc/arch-x86/syscalls/epoll_ctl.S @@ -25,7 +25,7 @@ ENTRY(epoll_ctl) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/eventfd.S b/libc/arch-x86/syscalls/eventfd.S index 55c5e6a30..1098d2a97 100644 --- a/libc/arch-x86/syscalls/eventfd.S +++ b/libc/arch-x86/syscalls/eventfd.S @@ -17,7 +17,7 @@ ENTRY(eventfd) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/execve.S b/libc/arch-x86/syscalls/execve.S index 7ad54f761..1a26a81f1 100644 --- a/libc/arch-x86/syscalls/execve.S +++ b/libc/arch-x86/syscalls/execve.S @@ -21,7 +21,7 @@ ENTRY(execve) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/faccessat.S b/libc/arch-x86/syscalls/faccessat.S index 115d64574..087db6375 100644 --- a/libc/arch-x86/syscalls/faccessat.S +++ b/libc/arch-x86/syscalls/faccessat.S @@ -25,7 +25,7 @@ ENTRY(faccessat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/fallocate64.S b/libc/arch-x86/syscalls/fallocate64.S index f8bde62c7..3bfe4df73 100644 --- a/libc/arch-x86/syscalls/fallocate64.S +++ b/libc/arch-x86/syscalls/fallocate64.S @@ -33,7 +33,7 @@ ENTRY(fallocate64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebp diff --git a/libc/arch-x86/syscalls/fchdir.S b/libc/arch-x86/syscalls/fchdir.S index 56e496c77..b0e5031e3 100644 --- a/libc/arch-x86/syscalls/fchdir.S +++ b/libc/arch-x86/syscalls/fchdir.S @@ -13,7 +13,7 @@ ENTRY(fchdir) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/fchmod.S b/libc/arch-x86/syscalls/fchmod.S index 4badceaae..92fb3fe39 100644 --- a/libc/arch-x86/syscalls/fchmod.S +++ b/libc/arch-x86/syscalls/fchmod.S @@ -17,7 +17,7 @@ ENTRY(fchmod) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/fchmodat.S b/libc/arch-x86/syscalls/fchmodat.S index 552e85c49..3b8769cd7 100644 --- a/libc/arch-x86/syscalls/fchmodat.S +++ b/libc/arch-x86/syscalls/fchmodat.S @@ -25,7 +25,7 @@ ENTRY(fchmodat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/fchown.S b/libc/arch-x86/syscalls/fchown.S index 7e826379e..7e1991f13 100644 --- a/libc/arch-x86/syscalls/fchown.S +++ b/libc/arch-x86/syscalls/fchown.S @@ -21,7 +21,7 @@ ENTRY(fchown) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/fchownat.S b/libc/arch-x86/syscalls/fchownat.S index de039d0d9..8f22e97d6 100644 --- a/libc/arch-x86/syscalls/fchownat.S +++ b/libc/arch-x86/syscalls/fchownat.S @@ -29,7 +29,7 @@ ENTRY(fchownat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/fdatasync.S b/libc/arch-x86/syscalls/fdatasync.S index fdb55788c..12bc3287b 100644 --- a/libc/arch-x86/syscalls/fdatasync.S +++ b/libc/arch-x86/syscalls/fdatasync.S @@ -13,7 +13,7 @@ ENTRY(fdatasync) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/fgetxattr.S b/libc/arch-x86/syscalls/fgetxattr.S index 3ed63d3d5..4bc5ac7b1 100644 --- a/libc/arch-x86/syscalls/fgetxattr.S +++ b/libc/arch-x86/syscalls/fgetxattr.S @@ -25,7 +25,7 @@ ENTRY(fgetxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/flistxattr.S b/libc/arch-x86/syscalls/flistxattr.S index 2840114cd..a3fe3f77a 100644 --- a/libc/arch-x86/syscalls/flistxattr.S +++ b/libc/arch-x86/syscalls/flistxattr.S @@ -21,7 +21,7 @@ ENTRY(flistxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/flock.S b/libc/arch-x86/syscalls/flock.S index dc9ef0200..115d012f5 100644 --- a/libc/arch-x86/syscalls/flock.S +++ b/libc/arch-x86/syscalls/flock.S @@ -17,7 +17,7 @@ ENTRY(flock) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/fremovexattr.S b/libc/arch-x86/syscalls/fremovexattr.S index 1e77f828f..b498a5aee 100644 --- a/libc/arch-x86/syscalls/fremovexattr.S +++ b/libc/arch-x86/syscalls/fremovexattr.S @@ -17,7 +17,7 @@ ENTRY(fremovexattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/fsetxattr.S b/libc/arch-x86/syscalls/fsetxattr.S index 703a8d73c..1126ae4c0 100644 --- a/libc/arch-x86/syscalls/fsetxattr.S +++ b/libc/arch-x86/syscalls/fsetxattr.S @@ -29,7 +29,7 @@ ENTRY(fsetxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/fstat64.S b/libc/arch-x86/syscalls/fstat64.S index 970eeb11f..727a30bd6 100644 --- a/libc/arch-x86/syscalls/fstat64.S +++ b/libc/arch-x86/syscalls/fstat64.S @@ -17,7 +17,7 @@ ENTRY(fstat64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/fstatat64.S b/libc/arch-x86/syscalls/fstatat64.S index 476578d36..f0b8db17d 100644 --- a/libc/arch-x86/syscalls/fstatat64.S +++ b/libc/arch-x86/syscalls/fstatat64.S @@ -25,7 +25,7 @@ ENTRY(fstatat64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/fsync.S b/libc/arch-x86/syscalls/fsync.S index 9fc84b70c..092b6e1e5 100644 --- a/libc/arch-x86/syscalls/fsync.S +++ b/libc/arch-x86/syscalls/fsync.S @@ -13,7 +13,7 @@ ENTRY(fsync) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/ftruncate.S b/libc/arch-x86/syscalls/ftruncate.S index 6765d984c..d26aabfdf 100644 --- a/libc/arch-x86/syscalls/ftruncate.S +++ b/libc/arch-x86/syscalls/ftruncate.S @@ -17,7 +17,7 @@ ENTRY(ftruncate) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/ftruncate64.S b/libc/arch-x86/syscalls/ftruncate64.S index 21e26ce00..d07d91d35 100644 --- a/libc/arch-x86/syscalls/ftruncate64.S +++ b/libc/arch-x86/syscalls/ftruncate64.S @@ -21,7 +21,7 @@ ENTRY(ftruncate64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/getegid.S b/libc/arch-x86/syscalls/getegid.S index 445cd97da..30425b69d 100644 --- a/libc/arch-x86/syscalls/getegid.S +++ b/libc/arch-x86/syscalls/getegid.S @@ -9,7 +9,7 @@ ENTRY(getegid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/geteuid.S b/libc/arch-x86/syscalls/geteuid.S index 8290a939b..10cdf9dee 100644 --- a/libc/arch-x86/syscalls/geteuid.S +++ b/libc/arch-x86/syscalls/geteuid.S @@ -9,7 +9,7 @@ ENTRY(geteuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/getgid.S b/libc/arch-x86/syscalls/getgid.S index d90767f6f..75467e720 100644 --- a/libc/arch-x86/syscalls/getgid.S +++ b/libc/arch-x86/syscalls/getgid.S @@ -9,7 +9,7 @@ ENTRY(getgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/getgroups.S b/libc/arch-x86/syscalls/getgroups.S index d36c09cc8..d2adef247 100644 --- a/libc/arch-x86/syscalls/getgroups.S +++ b/libc/arch-x86/syscalls/getgroups.S @@ -17,7 +17,7 @@ ENTRY(getgroups) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getitimer.S b/libc/arch-x86/syscalls/getitimer.S index ebf12601d..505c6bbf9 100644 --- a/libc/arch-x86/syscalls/getitimer.S +++ b/libc/arch-x86/syscalls/getitimer.S @@ -17,7 +17,7 @@ ENTRY(getitimer) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getpeername.S b/libc/arch-x86/syscalls/getpeername.S index abecd4edb..83c70c558 100644 --- a/libc/arch-x86/syscalls/getpeername.S +++ b/libc/arch-x86/syscalls/getpeername.S @@ -18,7 +18,7 @@ ENTRY(getpeername) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getpgid.S b/libc/arch-x86/syscalls/getpgid.S index e74ed3b78..b8c97447b 100644 --- a/libc/arch-x86/syscalls/getpgid.S +++ b/libc/arch-x86/syscalls/getpgid.S @@ -13,7 +13,7 @@ ENTRY(getpgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/getppid.S b/libc/arch-x86/syscalls/getppid.S index 025fa42e4..3f3925611 100644 --- a/libc/arch-x86/syscalls/getppid.S +++ b/libc/arch-x86/syscalls/getppid.S @@ -9,7 +9,7 @@ ENTRY(getppid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/getresgid.S b/libc/arch-x86/syscalls/getresgid.S index fe08cdfcb..deb367aa4 100644 --- a/libc/arch-x86/syscalls/getresgid.S +++ b/libc/arch-x86/syscalls/getresgid.S @@ -21,7 +21,7 @@ ENTRY(getresgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/getresuid.S b/libc/arch-x86/syscalls/getresuid.S index 8e292fc5b..719b25ed3 100644 --- a/libc/arch-x86/syscalls/getresuid.S +++ b/libc/arch-x86/syscalls/getresuid.S @@ -21,7 +21,7 @@ ENTRY(getresuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/getrlimit.S b/libc/arch-x86/syscalls/getrlimit.S index fdb5a03fa..32ccccefe 100644 --- a/libc/arch-x86/syscalls/getrlimit.S +++ b/libc/arch-x86/syscalls/getrlimit.S @@ -17,7 +17,7 @@ ENTRY(getrlimit) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getrusage.S b/libc/arch-x86/syscalls/getrusage.S index ae5f79629..17b2f0a16 100644 --- a/libc/arch-x86/syscalls/getrusage.S +++ b/libc/arch-x86/syscalls/getrusage.S @@ -17,7 +17,7 @@ ENTRY(getrusage) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getsid.S b/libc/arch-x86/syscalls/getsid.S index e1dc87fde..f08f9c9a8 100644 --- a/libc/arch-x86/syscalls/getsid.S +++ b/libc/arch-x86/syscalls/getsid.S @@ -13,7 +13,7 @@ ENTRY(getsid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/getsockname.S b/libc/arch-x86/syscalls/getsockname.S index 254b755c8..00d92ea96 100644 --- a/libc/arch-x86/syscalls/getsockname.S +++ b/libc/arch-x86/syscalls/getsockname.S @@ -18,7 +18,7 @@ ENTRY(getsockname) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getsockopt.S b/libc/arch-x86/syscalls/getsockopt.S index 2ef630c0d..ad13dd286 100644 --- a/libc/arch-x86/syscalls/getsockopt.S +++ b/libc/arch-x86/syscalls/getsockopt.S @@ -18,7 +18,7 @@ ENTRY(getsockopt) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/gettimeofday.S b/libc/arch-x86/syscalls/gettimeofday.S index 709a17ba5..eeba91a8e 100644 --- a/libc/arch-x86/syscalls/gettimeofday.S +++ b/libc/arch-x86/syscalls/gettimeofday.S @@ -17,7 +17,7 @@ ENTRY(gettimeofday) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/getuid.S b/libc/arch-x86/syscalls/getuid.S index c375d309d..1007eb9a7 100644 --- a/libc/arch-x86/syscalls/getuid.S +++ b/libc/arch-x86/syscalls/getuid.S @@ -9,7 +9,7 @@ ENTRY(getuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/getxattr.S b/libc/arch-x86/syscalls/getxattr.S index db9c9dd68..755b5c342 100644 --- a/libc/arch-x86/syscalls/getxattr.S +++ b/libc/arch-x86/syscalls/getxattr.S @@ -25,7 +25,7 @@ ENTRY(getxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/init_module.S b/libc/arch-x86/syscalls/init_module.S index 543b31eec..607cc0758 100644 --- a/libc/arch-x86/syscalls/init_module.S +++ b/libc/arch-x86/syscalls/init_module.S @@ -21,7 +21,7 @@ ENTRY(init_module) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/inotify_add_watch.S b/libc/arch-x86/syscalls/inotify_add_watch.S index f58c6d181..5b89a55f4 100644 --- a/libc/arch-x86/syscalls/inotify_add_watch.S +++ b/libc/arch-x86/syscalls/inotify_add_watch.S @@ -21,7 +21,7 @@ ENTRY(inotify_add_watch) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/inotify_init1.S b/libc/arch-x86/syscalls/inotify_init1.S index 2c7b10013..d3e2bbae2 100644 --- a/libc/arch-x86/syscalls/inotify_init1.S +++ b/libc/arch-x86/syscalls/inotify_init1.S @@ -13,7 +13,7 @@ ENTRY(inotify_init1) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/inotify_rm_watch.S b/libc/arch-x86/syscalls/inotify_rm_watch.S index c453478ce..052a4ecbb 100644 --- a/libc/arch-x86/syscalls/inotify_rm_watch.S +++ b/libc/arch-x86/syscalls/inotify_rm_watch.S @@ -17,7 +17,7 @@ ENTRY(inotify_rm_watch) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/kill.S b/libc/arch-x86/syscalls/kill.S index 0c1e24ae9..d573a4b49 100644 --- a/libc/arch-x86/syscalls/kill.S +++ b/libc/arch-x86/syscalls/kill.S @@ -17,7 +17,7 @@ ENTRY(kill) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/klogctl.S b/libc/arch-x86/syscalls/klogctl.S index 869324a44..387b8597e 100644 --- a/libc/arch-x86/syscalls/klogctl.S +++ b/libc/arch-x86/syscalls/klogctl.S @@ -21,7 +21,7 @@ ENTRY(klogctl) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/lgetxattr.S b/libc/arch-x86/syscalls/lgetxattr.S index 3ed4f1127..c61bcc48e 100644 --- a/libc/arch-x86/syscalls/lgetxattr.S +++ b/libc/arch-x86/syscalls/lgetxattr.S @@ -25,7 +25,7 @@ ENTRY(lgetxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/linkat.S b/libc/arch-x86/syscalls/linkat.S index e0c7e5f75..840061b27 100644 --- a/libc/arch-x86/syscalls/linkat.S +++ b/libc/arch-x86/syscalls/linkat.S @@ -29,7 +29,7 @@ ENTRY(linkat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/listen.S b/libc/arch-x86/syscalls/listen.S index c65f97045..0c2e3f2ff 100644 --- a/libc/arch-x86/syscalls/listen.S +++ b/libc/arch-x86/syscalls/listen.S @@ -18,7 +18,7 @@ ENTRY(listen) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/listxattr.S b/libc/arch-x86/syscalls/listxattr.S index 98a51143d..fe065f22c 100644 --- a/libc/arch-x86/syscalls/listxattr.S +++ b/libc/arch-x86/syscalls/listxattr.S @@ -21,7 +21,7 @@ ENTRY(listxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/llistxattr.S b/libc/arch-x86/syscalls/llistxattr.S index a5ab636a6..a7f56a917 100644 --- a/libc/arch-x86/syscalls/llistxattr.S +++ b/libc/arch-x86/syscalls/llistxattr.S @@ -21,7 +21,7 @@ ENTRY(llistxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/lremovexattr.S b/libc/arch-x86/syscalls/lremovexattr.S index 508abbacd..795bf3395 100644 --- a/libc/arch-x86/syscalls/lremovexattr.S +++ b/libc/arch-x86/syscalls/lremovexattr.S @@ -17,7 +17,7 @@ ENTRY(lremovexattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/lseek.S b/libc/arch-x86/syscalls/lseek.S index 5f77831cd..7806922f3 100644 --- a/libc/arch-x86/syscalls/lseek.S +++ b/libc/arch-x86/syscalls/lseek.S @@ -21,7 +21,7 @@ ENTRY(lseek) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/lsetxattr.S b/libc/arch-x86/syscalls/lsetxattr.S index d8786849b..522f41efc 100644 --- a/libc/arch-x86/syscalls/lsetxattr.S +++ b/libc/arch-x86/syscalls/lsetxattr.S @@ -29,7 +29,7 @@ ENTRY(lsetxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/madvise.S b/libc/arch-x86/syscalls/madvise.S index 3e8c7fdee..9e12316b4 100644 --- a/libc/arch-x86/syscalls/madvise.S +++ b/libc/arch-x86/syscalls/madvise.S @@ -21,7 +21,7 @@ ENTRY(madvise) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/mincore.S b/libc/arch-x86/syscalls/mincore.S index 7096f6c57..6dd01d3e4 100644 --- a/libc/arch-x86/syscalls/mincore.S +++ b/libc/arch-x86/syscalls/mincore.S @@ -21,7 +21,7 @@ ENTRY(mincore) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/mkdirat.S b/libc/arch-x86/syscalls/mkdirat.S index 862a18cfc..54035f45e 100644 --- a/libc/arch-x86/syscalls/mkdirat.S +++ b/libc/arch-x86/syscalls/mkdirat.S @@ -21,7 +21,7 @@ ENTRY(mkdirat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/mknodat.S b/libc/arch-x86/syscalls/mknodat.S index e03ba42a9..10ffd09f5 100644 --- a/libc/arch-x86/syscalls/mknodat.S +++ b/libc/arch-x86/syscalls/mknodat.S @@ -25,7 +25,7 @@ ENTRY(mknodat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/mlock.S b/libc/arch-x86/syscalls/mlock.S index f582f7729..1370eaeeb 100644 --- a/libc/arch-x86/syscalls/mlock.S +++ b/libc/arch-x86/syscalls/mlock.S @@ -17,7 +17,7 @@ ENTRY(mlock) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/mlockall.S b/libc/arch-x86/syscalls/mlockall.S index becca812c..97147f45e 100644 --- a/libc/arch-x86/syscalls/mlockall.S +++ b/libc/arch-x86/syscalls/mlockall.S @@ -13,7 +13,7 @@ ENTRY(mlockall) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/mount.S b/libc/arch-x86/syscalls/mount.S index 7be28115e..b4540cd63 100644 --- a/libc/arch-x86/syscalls/mount.S +++ b/libc/arch-x86/syscalls/mount.S @@ -29,7 +29,7 @@ ENTRY(mount) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/mprotect.S b/libc/arch-x86/syscalls/mprotect.S index 0516c45f3..eba6e196e 100644 --- a/libc/arch-x86/syscalls/mprotect.S +++ b/libc/arch-x86/syscalls/mprotect.S @@ -21,7 +21,7 @@ ENTRY(mprotect) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/mremap.S b/libc/arch-x86/syscalls/mremap.S index 42e75ced9..161edd21e 100644 --- a/libc/arch-x86/syscalls/mremap.S +++ b/libc/arch-x86/syscalls/mremap.S @@ -25,7 +25,7 @@ ENTRY(mremap) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/msync.S b/libc/arch-x86/syscalls/msync.S index 66722f2e5..b956d12f0 100644 --- a/libc/arch-x86/syscalls/msync.S +++ b/libc/arch-x86/syscalls/msync.S @@ -21,7 +21,7 @@ ENTRY(msync) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/munlock.S b/libc/arch-x86/syscalls/munlock.S index 2fc3aa703..e210eaada 100644 --- a/libc/arch-x86/syscalls/munlock.S +++ b/libc/arch-x86/syscalls/munlock.S @@ -17,7 +17,7 @@ ENTRY(munlock) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/munlockall.S b/libc/arch-x86/syscalls/munlockall.S index 1bc99ea0a..301b5b3c8 100644 --- a/libc/arch-x86/syscalls/munlockall.S +++ b/libc/arch-x86/syscalls/munlockall.S @@ -9,7 +9,7 @@ ENTRY(munlockall) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/munmap.S b/libc/arch-x86/syscalls/munmap.S index 878aae7aa..a7ef44935 100644 --- a/libc/arch-x86/syscalls/munmap.S +++ b/libc/arch-x86/syscalls/munmap.S @@ -17,7 +17,7 @@ ENTRY(munmap) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/nanosleep.S b/libc/arch-x86/syscalls/nanosleep.S index fe8af908d..c95293232 100644 --- a/libc/arch-x86/syscalls/nanosleep.S +++ b/libc/arch-x86/syscalls/nanosleep.S @@ -17,7 +17,7 @@ ENTRY(nanosleep) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/personality.S b/libc/arch-x86/syscalls/personality.S index 8c8e0ffa4..213669424 100644 --- a/libc/arch-x86/syscalls/personality.S +++ b/libc/arch-x86/syscalls/personality.S @@ -13,7 +13,7 @@ ENTRY(personality) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/pipe2.S b/libc/arch-x86/syscalls/pipe2.S index 99c4e8b61..80b27e0df 100644 --- a/libc/arch-x86/syscalls/pipe2.S +++ b/libc/arch-x86/syscalls/pipe2.S @@ -17,7 +17,7 @@ ENTRY(pipe2) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/prctl.S b/libc/arch-x86/syscalls/prctl.S index 63ec899e3..418aedde8 100644 --- a/libc/arch-x86/syscalls/prctl.S +++ b/libc/arch-x86/syscalls/prctl.S @@ -29,7 +29,7 @@ ENTRY(prctl) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/pread64.S b/libc/arch-x86/syscalls/pread64.S index 6b3c8ad16..115b58f54 100644 --- a/libc/arch-x86/syscalls/pread64.S +++ b/libc/arch-x86/syscalls/pread64.S @@ -29,7 +29,7 @@ ENTRY(pread64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/prlimit64.S b/libc/arch-x86/syscalls/prlimit64.S index 6aa875fa3..567667b60 100644 --- a/libc/arch-x86/syscalls/prlimit64.S +++ b/libc/arch-x86/syscalls/prlimit64.S @@ -25,7 +25,7 @@ ENTRY(prlimit64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/pwrite64.S b/libc/arch-x86/syscalls/pwrite64.S index 7d5309527..cc27b5ecd 100644 --- a/libc/arch-x86/syscalls/pwrite64.S +++ b/libc/arch-x86/syscalls/pwrite64.S @@ -29,7 +29,7 @@ ENTRY(pwrite64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/read.S b/libc/arch-x86/syscalls/read.S index 9814c8ffc..976ba834a 100644 --- a/libc/arch-x86/syscalls/read.S +++ b/libc/arch-x86/syscalls/read.S @@ -21,7 +21,7 @@ ENTRY(read) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/readahead.S b/libc/arch-x86/syscalls/readahead.S index 49a17d043..0849de656 100644 --- a/libc/arch-x86/syscalls/readahead.S +++ b/libc/arch-x86/syscalls/readahead.S @@ -25,7 +25,7 @@ ENTRY(readahead) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/readlinkat.S b/libc/arch-x86/syscalls/readlinkat.S index 1a161c01a..0d46748f2 100644 --- a/libc/arch-x86/syscalls/readlinkat.S +++ b/libc/arch-x86/syscalls/readlinkat.S @@ -25,7 +25,7 @@ ENTRY(readlinkat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/readv.S b/libc/arch-x86/syscalls/readv.S index 8b5ff4186..18d6e2261 100644 --- a/libc/arch-x86/syscalls/readv.S +++ b/libc/arch-x86/syscalls/readv.S @@ -21,7 +21,7 @@ ENTRY(readv) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/recvfrom.S b/libc/arch-x86/syscalls/recvfrom.S index 53d08f638..a566a4adb 100644 --- a/libc/arch-x86/syscalls/recvfrom.S +++ b/libc/arch-x86/syscalls/recvfrom.S @@ -18,7 +18,7 @@ ENTRY(recvfrom) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/recvmmsg.S b/libc/arch-x86/syscalls/recvmmsg.S index 3ef874027..a357acf0b 100644 --- a/libc/arch-x86/syscalls/recvmmsg.S +++ b/libc/arch-x86/syscalls/recvmmsg.S @@ -18,7 +18,7 @@ ENTRY(recvmmsg) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/recvmsg.S b/libc/arch-x86/syscalls/recvmsg.S index 150672d0a..fdb5411cd 100644 --- a/libc/arch-x86/syscalls/recvmsg.S +++ b/libc/arch-x86/syscalls/recvmsg.S @@ -18,7 +18,7 @@ ENTRY(recvmsg) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/removexattr.S b/libc/arch-x86/syscalls/removexattr.S index e7c55eb03..4dfca798e 100644 --- a/libc/arch-x86/syscalls/removexattr.S +++ b/libc/arch-x86/syscalls/removexattr.S @@ -17,7 +17,7 @@ ENTRY(removexattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/renameat.S b/libc/arch-x86/syscalls/renameat.S index 5dfe65ffb..69b447b68 100644 --- a/libc/arch-x86/syscalls/renameat.S +++ b/libc/arch-x86/syscalls/renameat.S @@ -25,7 +25,7 @@ ENTRY(renameat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/sched_get_priority_max.S b/libc/arch-x86/syscalls/sched_get_priority_max.S index d8debe281..a5e938d08 100644 --- a/libc/arch-x86/syscalls/sched_get_priority_max.S +++ b/libc/arch-x86/syscalls/sched_get_priority_max.S @@ -13,7 +13,7 @@ ENTRY(sched_get_priority_max) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/sched_get_priority_min.S b/libc/arch-x86/syscalls/sched_get_priority_min.S index e9689fab1..ba871826f 100644 --- a/libc/arch-x86/syscalls/sched_get_priority_min.S +++ b/libc/arch-x86/syscalls/sched_get_priority_min.S @@ -13,7 +13,7 @@ ENTRY(sched_get_priority_min) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/sched_getparam.S b/libc/arch-x86/syscalls/sched_getparam.S index 6b5e7c86b..c97805854 100644 --- a/libc/arch-x86/syscalls/sched_getparam.S +++ b/libc/arch-x86/syscalls/sched_getparam.S @@ -17,7 +17,7 @@ ENTRY(sched_getparam) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sched_getscheduler.S b/libc/arch-x86/syscalls/sched_getscheduler.S index a2c5746b6..811479276 100644 --- a/libc/arch-x86/syscalls/sched_getscheduler.S +++ b/libc/arch-x86/syscalls/sched_getscheduler.S @@ -13,7 +13,7 @@ ENTRY(sched_getscheduler) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/sched_rr_get_interval.S b/libc/arch-x86/syscalls/sched_rr_get_interval.S index f8012f317..8f3c6984c 100644 --- a/libc/arch-x86/syscalls/sched_rr_get_interval.S +++ b/libc/arch-x86/syscalls/sched_rr_get_interval.S @@ -17,7 +17,7 @@ ENTRY(sched_rr_get_interval) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sched_setaffinity.S b/libc/arch-x86/syscalls/sched_setaffinity.S index 76013f9ab..725e5dbd9 100644 --- a/libc/arch-x86/syscalls/sched_setaffinity.S +++ b/libc/arch-x86/syscalls/sched_setaffinity.S @@ -21,7 +21,7 @@ ENTRY(sched_setaffinity) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/sched_setparam.S b/libc/arch-x86/syscalls/sched_setparam.S index aca4bd902..29db8b944 100644 --- a/libc/arch-x86/syscalls/sched_setparam.S +++ b/libc/arch-x86/syscalls/sched_setparam.S @@ -17,7 +17,7 @@ ENTRY(sched_setparam) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sched_setscheduler.S b/libc/arch-x86/syscalls/sched_setscheduler.S index fad72c607..96f7661b2 100644 --- a/libc/arch-x86/syscalls/sched_setscheduler.S +++ b/libc/arch-x86/syscalls/sched_setscheduler.S @@ -21,7 +21,7 @@ ENTRY(sched_setscheduler) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/sched_yield.S b/libc/arch-x86/syscalls/sched_yield.S index 8b4a9beba..b08e9a561 100644 --- a/libc/arch-x86/syscalls/sched_yield.S +++ b/libc/arch-x86/syscalls/sched_yield.S @@ -13,7 +13,7 @@ ENTRY(sched_yield) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/sendfile.S b/libc/arch-x86/syscalls/sendfile.S index 7bd86d0a5..b20b86817 100644 --- a/libc/arch-x86/syscalls/sendfile.S +++ b/libc/arch-x86/syscalls/sendfile.S @@ -25,7 +25,7 @@ ENTRY(sendfile) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/sendfile64.S b/libc/arch-x86/syscalls/sendfile64.S index bd76043f7..a818e59fb 100644 --- a/libc/arch-x86/syscalls/sendfile64.S +++ b/libc/arch-x86/syscalls/sendfile64.S @@ -25,7 +25,7 @@ ENTRY(sendfile64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/sendmmsg.S b/libc/arch-x86/syscalls/sendmmsg.S index 4bc3c4076..51ead9863 100644 --- a/libc/arch-x86/syscalls/sendmmsg.S +++ b/libc/arch-x86/syscalls/sendmmsg.S @@ -18,7 +18,7 @@ ENTRY(sendmmsg) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sendmsg.S b/libc/arch-x86/syscalls/sendmsg.S index eb8fc63f5..f9653b8d2 100644 --- a/libc/arch-x86/syscalls/sendmsg.S +++ b/libc/arch-x86/syscalls/sendmsg.S @@ -18,7 +18,7 @@ ENTRY(sendmsg) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sendto.S b/libc/arch-x86/syscalls/sendto.S index 8cb72c87c..84af30804 100644 --- a/libc/arch-x86/syscalls/sendto.S +++ b/libc/arch-x86/syscalls/sendto.S @@ -18,7 +18,7 @@ ENTRY(sendto) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setfsgid.S b/libc/arch-x86/syscalls/setfsgid.S index fa7a5c59f..a6dd79dfb 100644 --- a/libc/arch-x86/syscalls/setfsgid.S +++ b/libc/arch-x86/syscalls/setfsgid.S @@ -13,7 +13,7 @@ ENTRY(setfsgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/setfsuid.S b/libc/arch-x86/syscalls/setfsuid.S index 5856a16e0..2c148fb58 100644 --- a/libc/arch-x86/syscalls/setfsuid.S +++ b/libc/arch-x86/syscalls/setfsuid.S @@ -13,7 +13,7 @@ ENTRY(setfsuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/setgid.S b/libc/arch-x86/syscalls/setgid.S index baa1b1a4b..735dd8f1d 100644 --- a/libc/arch-x86/syscalls/setgid.S +++ b/libc/arch-x86/syscalls/setgid.S @@ -13,7 +13,7 @@ ENTRY(setgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/setgroups.S b/libc/arch-x86/syscalls/setgroups.S index 364aaad0f..382286d69 100644 --- a/libc/arch-x86/syscalls/setgroups.S +++ b/libc/arch-x86/syscalls/setgroups.S @@ -17,7 +17,7 @@ ENTRY(setgroups) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setitimer.S b/libc/arch-x86/syscalls/setitimer.S index 409c4c660..4c9dff688 100644 --- a/libc/arch-x86/syscalls/setitimer.S +++ b/libc/arch-x86/syscalls/setitimer.S @@ -21,7 +21,7 @@ ENTRY(setitimer) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/setns.S b/libc/arch-x86/syscalls/setns.S index ddbe758e8..03e420613 100644 --- a/libc/arch-x86/syscalls/setns.S +++ b/libc/arch-x86/syscalls/setns.S @@ -17,7 +17,7 @@ ENTRY(setns) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setpgid.S b/libc/arch-x86/syscalls/setpgid.S index ac1b12d67..b0a326885 100644 --- a/libc/arch-x86/syscalls/setpgid.S +++ b/libc/arch-x86/syscalls/setpgid.S @@ -17,7 +17,7 @@ ENTRY(setpgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setpriority.S b/libc/arch-x86/syscalls/setpriority.S index 93c1e07bc..f54d478ef 100644 --- a/libc/arch-x86/syscalls/setpriority.S +++ b/libc/arch-x86/syscalls/setpriority.S @@ -21,7 +21,7 @@ ENTRY(setpriority) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/setregid.S b/libc/arch-x86/syscalls/setregid.S index 0ecfa9ae7..5e0fdf2bd 100644 --- a/libc/arch-x86/syscalls/setregid.S +++ b/libc/arch-x86/syscalls/setregid.S @@ -17,7 +17,7 @@ ENTRY(setregid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setresgid.S b/libc/arch-x86/syscalls/setresgid.S index a6914c492..286776f4a 100644 --- a/libc/arch-x86/syscalls/setresgid.S +++ b/libc/arch-x86/syscalls/setresgid.S @@ -21,7 +21,7 @@ ENTRY(setresgid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/setresuid.S b/libc/arch-x86/syscalls/setresuid.S index c33c1cabc..8cd75dc07 100644 --- a/libc/arch-x86/syscalls/setresuid.S +++ b/libc/arch-x86/syscalls/setresuid.S @@ -21,7 +21,7 @@ ENTRY(setresuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/setreuid.S b/libc/arch-x86/syscalls/setreuid.S index 4244988d2..fa4e792e1 100644 --- a/libc/arch-x86/syscalls/setreuid.S +++ b/libc/arch-x86/syscalls/setreuid.S @@ -17,7 +17,7 @@ ENTRY(setreuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setrlimit.S b/libc/arch-x86/syscalls/setrlimit.S index 3e8650434..7ba17d09e 100644 --- a/libc/arch-x86/syscalls/setrlimit.S +++ b/libc/arch-x86/syscalls/setrlimit.S @@ -17,7 +17,7 @@ ENTRY(setrlimit) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setsid.S b/libc/arch-x86/syscalls/setsid.S index 398c11056..c76001d88 100644 --- a/libc/arch-x86/syscalls/setsid.S +++ b/libc/arch-x86/syscalls/setsid.S @@ -9,7 +9,7 @@ ENTRY(setsid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: ret diff --git a/libc/arch-x86/syscalls/setsockopt.S b/libc/arch-x86/syscalls/setsockopt.S index 6ef168f81..ad65c4043 100644 --- a/libc/arch-x86/syscalls/setsockopt.S +++ b/libc/arch-x86/syscalls/setsockopt.S @@ -18,7 +18,7 @@ ENTRY(setsockopt) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/settimeofday.S b/libc/arch-x86/syscalls/settimeofday.S index 37e11c53c..518b3ab3b 100644 --- a/libc/arch-x86/syscalls/settimeofday.S +++ b/libc/arch-x86/syscalls/settimeofday.S @@ -17,7 +17,7 @@ ENTRY(settimeofday) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/setuid.S b/libc/arch-x86/syscalls/setuid.S index fcea66d97..45747ff34 100644 --- a/libc/arch-x86/syscalls/setuid.S +++ b/libc/arch-x86/syscalls/setuid.S @@ -13,7 +13,7 @@ ENTRY(setuid) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/setxattr.S b/libc/arch-x86/syscalls/setxattr.S index d6473cdc5..00d3a1432 100644 --- a/libc/arch-x86/syscalls/setxattr.S +++ b/libc/arch-x86/syscalls/setxattr.S @@ -29,7 +29,7 @@ ENTRY(setxattr) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edi diff --git a/libc/arch-x86/syscalls/shutdown.S b/libc/arch-x86/syscalls/shutdown.S index 32fa17a3b..7d81792f6 100644 --- a/libc/arch-x86/syscalls/shutdown.S +++ b/libc/arch-x86/syscalls/shutdown.S @@ -18,7 +18,7 @@ ENTRY(shutdown) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/sigaltstack.S b/libc/arch-x86/syscalls/sigaltstack.S index 6882a7837..e9ccf3598 100644 --- a/libc/arch-x86/syscalls/sigaltstack.S +++ b/libc/arch-x86/syscalls/sigaltstack.S @@ -17,7 +17,7 @@ ENTRY(sigaltstack) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/socketpair.S b/libc/arch-x86/syscalls/socketpair.S index 945faa019..60a95d8d6 100644 --- a/libc/arch-x86/syscalls/socketpair.S +++ b/libc/arch-x86/syscalls/socketpair.S @@ -18,7 +18,7 @@ ENTRY(socketpair) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/splice.S b/libc/arch-x86/syscalls/splice.S index 46e231275..f57e3f04e 100644 --- a/libc/arch-x86/syscalls/splice.S +++ b/libc/arch-x86/syscalls/splice.S @@ -33,7 +33,7 @@ ENTRY(splice) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebp diff --git a/libc/arch-x86/syscalls/swapoff.S b/libc/arch-x86/syscalls/swapoff.S index 0e210335d..1a5b67ca9 100644 --- a/libc/arch-x86/syscalls/swapoff.S +++ b/libc/arch-x86/syscalls/swapoff.S @@ -13,7 +13,7 @@ ENTRY(swapoff) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/swapon.S b/libc/arch-x86/syscalls/swapon.S index a4d5e0305..987e8da8d 100644 --- a/libc/arch-x86/syscalls/swapon.S +++ b/libc/arch-x86/syscalls/swapon.S @@ -17,7 +17,7 @@ ENTRY(swapon) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/symlinkat.S b/libc/arch-x86/syscalls/symlinkat.S index 618f5d827..1d93f08c7 100644 --- a/libc/arch-x86/syscalls/symlinkat.S +++ b/libc/arch-x86/syscalls/symlinkat.S @@ -21,7 +21,7 @@ ENTRY(symlinkat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/sync.S b/libc/arch-x86/syscalls/sync.S index a1f178239..532856d21 100644 --- a/libc/arch-x86/syscalls/sync.S +++ b/libc/arch-x86/syscalls/sync.S @@ -13,7 +13,7 @@ ENTRY(sync) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/sysinfo.S b/libc/arch-x86/syscalls/sysinfo.S index c3eabb06f..efe8d6e78 100644 --- a/libc/arch-x86/syscalls/sysinfo.S +++ b/libc/arch-x86/syscalls/sysinfo.S @@ -13,7 +13,7 @@ ENTRY(sysinfo) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/tee.S b/libc/arch-x86/syscalls/tee.S index 9422660a8..3ce5c8483 100644 --- a/libc/arch-x86/syscalls/tee.S +++ b/libc/arch-x86/syscalls/tee.S @@ -25,7 +25,7 @@ ENTRY(tee) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/tgkill.S b/libc/arch-x86/syscalls/tgkill.S index 385827ba4..9584992ac 100644 --- a/libc/arch-x86/syscalls/tgkill.S +++ b/libc/arch-x86/syscalls/tgkill.S @@ -21,7 +21,7 @@ ENTRY(tgkill) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/timerfd_create.S b/libc/arch-x86/syscalls/timerfd_create.S index 343195e19..aba3403d8 100644 --- a/libc/arch-x86/syscalls/timerfd_create.S +++ b/libc/arch-x86/syscalls/timerfd_create.S @@ -17,7 +17,7 @@ ENTRY(timerfd_create) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/timerfd_gettime.S b/libc/arch-x86/syscalls/timerfd_gettime.S index 9b3a31457..18ed8d501 100644 --- a/libc/arch-x86/syscalls/timerfd_gettime.S +++ b/libc/arch-x86/syscalls/timerfd_gettime.S @@ -17,7 +17,7 @@ ENTRY(timerfd_gettime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/timerfd_settime.S b/libc/arch-x86/syscalls/timerfd_settime.S index 819b7234d..e246c17cb 100644 --- a/libc/arch-x86/syscalls/timerfd_settime.S +++ b/libc/arch-x86/syscalls/timerfd_settime.S @@ -25,7 +25,7 @@ ENTRY(timerfd_settime) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/times.S b/libc/arch-x86/syscalls/times.S index f5739d32c..c25ad9bd9 100644 --- a/libc/arch-x86/syscalls/times.S +++ b/libc/arch-x86/syscalls/times.S @@ -13,7 +13,7 @@ ENTRY(times) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/truncate.S b/libc/arch-x86/syscalls/truncate.S index 427f95f93..9f77cf9bf 100644 --- a/libc/arch-x86/syscalls/truncate.S +++ b/libc/arch-x86/syscalls/truncate.S @@ -17,7 +17,7 @@ ENTRY(truncate) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/truncate64.S b/libc/arch-x86/syscalls/truncate64.S index 2c497511f..8f67b809c 100644 --- a/libc/arch-x86/syscalls/truncate64.S +++ b/libc/arch-x86/syscalls/truncate64.S @@ -21,7 +21,7 @@ ENTRY(truncate64) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/umask.S b/libc/arch-x86/syscalls/umask.S index 3affc8de2..8935d22b8 100644 --- a/libc/arch-x86/syscalls/umask.S +++ b/libc/arch-x86/syscalls/umask.S @@ -13,7 +13,7 @@ ENTRY(umask) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/umount2.S b/libc/arch-x86/syscalls/umount2.S index d2b3549e2..d5cc95ca5 100644 --- a/libc/arch-x86/syscalls/umount2.S +++ b/libc/arch-x86/syscalls/umount2.S @@ -17,7 +17,7 @@ ENTRY(umount2) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ecx diff --git a/libc/arch-x86/syscalls/uname.S b/libc/arch-x86/syscalls/uname.S index e99680543..8ab116564 100644 --- a/libc/arch-x86/syscalls/uname.S +++ b/libc/arch-x86/syscalls/uname.S @@ -13,7 +13,7 @@ ENTRY(uname) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/unlinkat.S b/libc/arch-x86/syscalls/unlinkat.S index 6417d2bdb..eb5a5cdff 100644 --- a/libc/arch-x86/syscalls/unlinkat.S +++ b/libc/arch-x86/syscalls/unlinkat.S @@ -21,7 +21,7 @@ ENTRY(unlinkat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/unshare.S b/libc/arch-x86/syscalls/unshare.S index a289d4d55..ed25f88cb 100644 --- a/libc/arch-x86/syscalls/unshare.S +++ b/libc/arch-x86/syscalls/unshare.S @@ -13,7 +13,7 @@ ENTRY(unshare) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %ebx diff --git a/libc/arch-x86/syscalls/utimensat.S b/libc/arch-x86/syscalls/utimensat.S index d8c908040..89811f7cd 100644 --- a/libc/arch-x86/syscalls/utimensat.S +++ b/libc/arch-x86/syscalls/utimensat.S @@ -25,7 +25,7 @@ ENTRY(utimensat) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/vmsplice.S b/libc/arch-x86/syscalls/vmsplice.S index 2afba6043..3ca81e773 100644 --- a/libc/arch-x86/syscalls/vmsplice.S +++ b/libc/arch-x86/syscalls/vmsplice.S @@ -25,7 +25,7 @@ ENTRY(vmsplice) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/wait4.S b/libc/arch-x86/syscalls/wait4.S index fda75c05f..4013818f1 100644 --- a/libc/arch-x86/syscalls/wait4.S +++ b/libc/arch-x86/syscalls/wait4.S @@ -25,7 +25,7 @@ ENTRY(wait4) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %esi diff --git a/libc/arch-x86/syscalls/write.S b/libc/arch-x86/syscalls/write.S index 115974e4b..274ad5e9e 100644 --- a/libc/arch-x86/syscalls/write.S +++ b/libc/arch-x86/syscalls/write.S @@ -21,7 +21,7 @@ ENTRY(write) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/syscalls/writev.S b/libc/arch-x86/syscalls/writev.S index 77e5cd129..40a2c79bf 100644 --- a/libc/arch-x86/syscalls/writev.S +++ b/libc/arch-x86/syscalls/writev.S @@ -21,7 +21,7 @@ ENTRY(writev) jb 1f negl %eax pushl %eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %esp 1: popl %edx diff --git a/libc/arch-x86/x86.mk b/libc/arch-x86/x86.mk index 8aa2645d3..019dc8e81 100644 --- a/libc/arch-x86/x86.mk +++ b/libc/arch-x86/x86.mk @@ -31,6 +31,7 @@ libc_bionic_src_files_x86 += \ arch-x86/bionic/__set_tls.c \ arch-x86/bionic/sigsetjmp.S \ arch-x86/bionic/syscall.S \ + arch-x86/bionic/vfork.S \ ## ARCH variant specific source files arch_variant_mk := $(LOCAL_PATH)/arch-x86/$(TARGET_ARCH_VARIANT)/$(TARGET_ARCH_VARIANT).mk diff --git a/libc/arch-x86_64/bionic/setjmp.S b/libc/arch-x86_64/bionic/setjmp.S index c81b5734c..f356877dd 100644 --- a/libc/arch-x86_64/bionic/setjmp.S +++ b/libc/arch-x86_64/bionic/setjmp.S @@ -52,11 +52,7 @@ ENTRY(setjmp) pushq %rdi xorq %rdi,%rdi -#ifdef __PIC__ call PIC_PLT(sigblock) -#else - call sigblock -#endif popq %rdi movq %rax,(_JB_SIGMASK * 8)(%rdi) @@ -80,11 +76,7 @@ ENTRY(longjmp) movq (_JB_SIGMASK * 8)(%rdi),%rdi pushq %r8 -#ifdef __PIC__ call PIC_PLT(sigsetmask) -#else - call sigsetmask -#endif popq %r8 movq (_JB_RBX * 8)(%r12),%rbx movq (_JB_RBP * 8)(%r12),%rbp diff --git a/libc/arch-x86_64/bionic/sigsetjmp.S b/libc/arch-x86_64/bionic/sigsetjmp.S index 718743f94..571fea3f8 100644 --- a/libc/arch-x86_64/bionic/sigsetjmp.S +++ b/libc/arch-x86_64/bionic/sigsetjmp.S @@ -57,11 +57,7 @@ ENTRY(sigsetjmp) pushq %rdi xorq %rdi,%rdi -#ifdef __PIC__ call PIC_PLT(sigblock) -#else - call sigblock -#endif popq %rdi movq %rax,(_JB_SIGMASK * 8)(%rdi) @@ -86,11 +82,7 @@ ENTRY(siglongjmp) jz 2f movq (_JB_SIGMASK * 8)(%rdi),%rdi -#ifdef __PIC__ call PIC_PLT(sigsetmask) -#else - call sigsetmask -#endif 2: popq %rax movq (_JB_RBX * 8)(%r12),%rbx movq (_JB_RBP * 8)(%r12),%rbp diff --git a/libc/bionic/vfork.cpp b/libc/arch-x86_64/bionic/vfork.S index b706a7f7d..7c14cc0d9 100644 --- a/libc/bionic/vfork.cpp +++ b/libc/arch-x86_64/bionic/vfork.S @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 The Android Open Source Project + * Copyright (C) 2013 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,10 +26,20 @@ * SUCH DAMAGE. */ -#include <unistd.h> +#include <private/bionic_asm.h> -// vfork(2) was removed from POSIX 2008, but it's common enough that we can't -// actually remove it entirely. -extern "C" pid_t vfork(void) { - return fork(); -} +// This custom code preserves the return address across the system call. + +ENTRY(vfork) + popq %rdi // Grab the return address. + movl $__NR_vfork, %eax + syscall + pushq %rdi // Restore the return address. + cmpq $-MAX_ERRNO, %rax + jb 1f + negl %eax + movl %eax, %edi + call __set_errno +1: + ret +END(vfork) diff --git a/libc/arch-x86_64/include/machine/asm.h b/libc/arch-x86_64/include/machine/asm.h index 0af6dae46..06da39aae 100644 --- a/libc/arch-x86_64/include/machine/asm.h +++ b/libc/arch-x86_64/include/machine/asm.h @@ -37,13 +37,8 @@ #ifndef _AMD64_ASM_H_ #define _AMD64_ASM_H_ -#ifdef __PIC__ #define PIC_PLT(x) x@PLT #define PIC_GOT(x) x@GOTPCREL(%rip) -#else -#define PIC_PLT(x) x -#define PIC_GOT(x) x -#endif /* let kernels and others override entrypoint alignment */ #ifndef _ALIGN_TEXT diff --git a/libc/arch-x86_64/syscalls/__accept4.S b/libc/arch-x86_64/syscalls/__accept4.S index 375a78b9d..c566b837e 100644 --- a/libc/arch-x86_64/syscalls/__accept4.S +++ b/libc/arch-x86_64/syscalls/__accept4.S @@ -10,7 +10,7 @@ ENTRY(__accept4) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__accept4) diff --git a/libc/arch-x86_64/syscalls/__arch_prctl.S b/libc/arch-x86_64/syscalls/__arch_prctl.S index 6c72a6c8d..5990ad1bc 100644 --- a/libc/arch-x86_64/syscalls/__arch_prctl.S +++ b/libc/arch-x86_64/syscalls/__arch_prctl.S @@ -9,7 +9,7 @@ ENTRY(__arch_prctl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__arch_prctl) diff --git a/libc/arch-x86_64/syscalls/__brk.S b/libc/arch-x86_64/syscalls/__brk.S index 18ebc105e..61c41d4f7 100644 --- a/libc/arch-x86_64/syscalls/__brk.S +++ b/libc/arch-x86_64/syscalls/__brk.S @@ -9,7 +9,7 @@ ENTRY(__brk) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__brk) diff --git a/libc/arch-x86_64/syscalls/__clock_gettime.S b/libc/arch-x86_64/syscalls/__clock_gettime.S index 7e553b80a..1088bac30 100644 --- a/libc/arch-x86_64/syscalls/__clock_gettime.S +++ b/libc/arch-x86_64/syscalls/__clock_gettime.S @@ -9,7 +9,7 @@ ENTRY(__clock_gettime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__clock_gettime) diff --git a/libc/arch-x86_64/syscalls/__connect.S b/libc/arch-x86_64/syscalls/__connect.S index a7d2e9308..08600a2de 100644 --- a/libc/arch-x86_64/syscalls/__connect.S +++ b/libc/arch-x86_64/syscalls/__connect.S @@ -9,7 +9,7 @@ ENTRY(__connect) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__connect) diff --git a/libc/arch-x86_64/syscalls/__epoll_pwait.S b/libc/arch-x86_64/syscalls/__epoll_pwait.S index 4271b53ad..b2de8a317 100644 --- a/libc/arch-x86_64/syscalls/__epoll_pwait.S +++ b/libc/arch-x86_64/syscalls/__epoll_pwait.S @@ -10,7 +10,7 @@ ENTRY(__epoll_pwait) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__epoll_pwait) diff --git a/libc/arch-x86_64/syscalls/__exit.S b/libc/arch-x86_64/syscalls/__exit.S index bcbaffcfd..38957db5a 100644 --- a/libc/arch-x86_64/syscalls/__exit.S +++ b/libc/arch-x86_64/syscalls/__exit.S @@ -9,7 +9,7 @@ ENTRY(__exit) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__exit) diff --git a/libc/arch-x86_64/syscalls/__getcpu.S b/libc/arch-x86_64/syscalls/__getcpu.S index c25f294e9..3c4a868f8 100644 --- a/libc/arch-x86_64/syscalls/__getcpu.S +++ b/libc/arch-x86_64/syscalls/__getcpu.S @@ -9,7 +9,7 @@ ENTRY(__getcpu) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__getcpu) diff --git a/libc/arch-x86_64/syscalls/__getcwd.S b/libc/arch-x86_64/syscalls/__getcwd.S index 1743838f7..046e4dec2 100644 --- a/libc/arch-x86_64/syscalls/__getcwd.S +++ b/libc/arch-x86_64/syscalls/__getcwd.S @@ -9,7 +9,7 @@ ENTRY(__getcwd) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__getcwd) diff --git a/libc/arch-x86_64/syscalls/__getdents64.S b/libc/arch-x86_64/syscalls/__getdents64.S index 64f82fd03..f94863f3a 100644 --- a/libc/arch-x86_64/syscalls/__getdents64.S +++ b/libc/arch-x86_64/syscalls/__getdents64.S @@ -9,7 +9,7 @@ ENTRY(__getdents64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__getdents64) diff --git a/libc/arch-x86_64/syscalls/__getpid.S b/libc/arch-x86_64/syscalls/__getpid.S index bd1bf1ee1..69e3c5c2e 100644 --- a/libc/arch-x86_64/syscalls/__getpid.S +++ b/libc/arch-x86_64/syscalls/__getpid.S @@ -9,7 +9,7 @@ ENTRY(__getpid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__getpid) diff --git a/libc/arch-x86_64/syscalls/__getpriority.S b/libc/arch-x86_64/syscalls/__getpriority.S index 349f57466..8a9b10979 100644 --- a/libc/arch-x86_64/syscalls/__getpriority.S +++ b/libc/arch-x86_64/syscalls/__getpriority.S @@ -9,7 +9,7 @@ ENTRY(__getpriority) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__getpriority) diff --git a/libc/arch-x86_64/syscalls/__gettimeofday.S b/libc/arch-x86_64/syscalls/__gettimeofday.S index a38eb64c7..3a6124af3 100644 --- a/libc/arch-x86_64/syscalls/__gettimeofday.S +++ b/libc/arch-x86_64/syscalls/__gettimeofday.S @@ -9,7 +9,7 @@ ENTRY(__gettimeofday) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__gettimeofday) diff --git a/libc/arch-x86_64/syscalls/__ioctl.S b/libc/arch-x86_64/syscalls/__ioctl.S index 277591107..240a121a8 100644 --- a/libc/arch-x86_64/syscalls/__ioctl.S +++ b/libc/arch-x86_64/syscalls/__ioctl.S @@ -9,7 +9,7 @@ ENTRY(__ioctl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__ioctl) diff --git a/libc/arch-x86_64/syscalls/__openat.S b/libc/arch-x86_64/syscalls/__openat.S index dce4c7c75..d0762d7f4 100644 --- a/libc/arch-x86_64/syscalls/__openat.S +++ b/libc/arch-x86_64/syscalls/__openat.S @@ -10,7 +10,7 @@ ENTRY(__openat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__openat) diff --git a/libc/arch-x86_64/syscalls/__ppoll.S b/libc/arch-x86_64/syscalls/__ppoll.S index 31ba7e958..439a000b0 100644 --- a/libc/arch-x86_64/syscalls/__ppoll.S +++ b/libc/arch-x86_64/syscalls/__ppoll.S @@ -10,7 +10,7 @@ ENTRY(__ppoll) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__ppoll) diff --git a/libc/arch-x86_64/syscalls/__pselect6.S b/libc/arch-x86_64/syscalls/__pselect6.S index a212c4e02..c1780038f 100644 --- a/libc/arch-x86_64/syscalls/__pselect6.S +++ b/libc/arch-x86_64/syscalls/__pselect6.S @@ -10,7 +10,7 @@ ENTRY(__pselect6) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__pselect6) diff --git a/libc/arch-x86_64/syscalls/__ptrace.S b/libc/arch-x86_64/syscalls/__ptrace.S index 0a64fee73..ea8884779 100644 --- a/libc/arch-x86_64/syscalls/__ptrace.S +++ b/libc/arch-x86_64/syscalls/__ptrace.S @@ -10,7 +10,7 @@ ENTRY(__ptrace) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__ptrace) diff --git a/libc/arch-x86_64/syscalls/__reboot.S b/libc/arch-x86_64/syscalls/__reboot.S index 398d078f1..ef4ecfba9 100644 --- a/libc/arch-x86_64/syscalls/__reboot.S +++ b/libc/arch-x86_64/syscalls/__reboot.S @@ -10,7 +10,7 @@ ENTRY(__reboot) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__reboot) diff --git a/libc/arch-x86_64/syscalls/__rt_sigaction.S b/libc/arch-x86_64/syscalls/__rt_sigaction.S index f146b02f1..55aaa18a5 100644 --- a/libc/arch-x86_64/syscalls/__rt_sigaction.S +++ b/libc/arch-x86_64/syscalls/__rt_sigaction.S @@ -10,7 +10,7 @@ ENTRY(__rt_sigaction) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__rt_sigaction) diff --git a/libc/arch-x86_64/syscalls/__rt_sigpending.S b/libc/arch-x86_64/syscalls/__rt_sigpending.S index 9d1698b76..48b29fc85 100644 --- a/libc/arch-x86_64/syscalls/__rt_sigpending.S +++ b/libc/arch-x86_64/syscalls/__rt_sigpending.S @@ -9,7 +9,7 @@ ENTRY(__rt_sigpending) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__rt_sigpending) diff --git a/libc/arch-x86_64/syscalls/__rt_sigprocmask.S b/libc/arch-x86_64/syscalls/__rt_sigprocmask.S index 1ac9b81d8..43cd53e1a 100644 --- a/libc/arch-x86_64/syscalls/__rt_sigprocmask.S +++ b/libc/arch-x86_64/syscalls/__rt_sigprocmask.S @@ -10,7 +10,7 @@ ENTRY(__rt_sigprocmask) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__rt_sigprocmask) diff --git a/libc/arch-x86_64/syscalls/__rt_sigsuspend.S b/libc/arch-x86_64/syscalls/__rt_sigsuspend.S index 1059f0b72..0a69aafb0 100644 --- a/libc/arch-x86_64/syscalls/__rt_sigsuspend.S +++ b/libc/arch-x86_64/syscalls/__rt_sigsuspend.S @@ -9,7 +9,7 @@ ENTRY(__rt_sigsuspend) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__rt_sigsuspend) diff --git a/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S b/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S index de2e4cbe2..88a5258a6 100644 --- a/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S +++ b/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S @@ -10,7 +10,7 @@ ENTRY(__rt_sigtimedwait) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__rt_sigtimedwait) diff --git a/libc/arch-x86_64/syscalls/__sched_getaffinity.S b/libc/arch-x86_64/syscalls/__sched_getaffinity.S index 410954cdf..194f52749 100644 --- a/libc/arch-x86_64/syscalls/__sched_getaffinity.S +++ b/libc/arch-x86_64/syscalls/__sched_getaffinity.S @@ -9,7 +9,7 @@ ENTRY(__sched_getaffinity) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__sched_getaffinity) diff --git a/libc/arch-x86_64/syscalls/__set_tid_address.S b/libc/arch-x86_64/syscalls/__set_tid_address.S index c59c8b8c4..193dfb777 100644 --- a/libc/arch-x86_64/syscalls/__set_tid_address.S +++ b/libc/arch-x86_64/syscalls/__set_tid_address.S @@ -9,7 +9,7 @@ ENTRY(__set_tid_address) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__set_tid_address) diff --git a/libc/arch-x86_64/syscalls/__signalfd4.S b/libc/arch-x86_64/syscalls/__signalfd4.S index 6ddcf5a20..6becc9fbb 100644 --- a/libc/arch-x86_64/syscalls/__signalfd4.S +++ b/libc/arch-x86_64/syscalls/__signalfd4.S @@ -10,7 +10,7 @@ ENTRY(__signalfd4) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__signalfd4) diff --git a/libc/arch-x86_64/syscalls/__socket.S b/libc/arch-x86_64/syscalls/__socket.S index 209e329b4..e1a2df94a 100644 --- a/libc/arch-x86_64/syscalls/__socket.S +++ b/libc/arch-x86_64/syscalls/__socket.S @@ -9,7 +9,7 @@ ENTRY(__socket) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__socket) diff --git a/libc/arch-x86_64/syscalls/__timer_create.S b/libc/arch-x86_64/syscalls/__timer_create.S index 3450d2b82..8e4a4be7d 100644 --- a/libc/arch-x86_64/syscalls/__timer_create.S +++ b/libc/arch-x86_64/syscalls/__timer_create.S @@ -9,7 +9,7 @@ ENTRY(__timer_create) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__timer_create) diff --git a/libc/arch-x86_64/syscalls/__timer_delete.S b/libc/arch-x86_64/syscalls/__timer_delete.S index fd60a1608..5e93a028d 100644 --- a/libc/arch-x86_64/syscalls/__timer_delete.S +++ b/libc/arch-x86_64/syscalls/__timer_delete.S @@ -9,7 +9,7 @@ ENTRY(__timer_delete) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__timer_delete) diff --git a/libc/arch-x86_64/syscalls/__timer_getoverrun.S b/libc/arch-x86_64/syscalls/__timer_getoverrun.S index f5309a331..d17edac41 100644 --- a/libc/arch-x86_64/syscalls/__timer_getoverrun.S +++ b/libc/arch-x86_64/syscalls/__timer_getoverrun.S @@ -9,7 +9,7 @@ ENTRY(__timer_getoverrun) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__timer_getoverrun) diff --git a/libc/arch-x86_64/syscalls/__timer_gettime.S b/libc/arch-x86_64/syscalls/__timer_gettime.S index 7e2bc92e1..6c50bf0d4 100644 --- a/libc/arch-x86_64/syscalls/__timer_gettime.S +++ b/libc/arch-x86_64/syscalls/__timer_gettime.S @@ -9,7 +9,7 @@ ENTRY(__timer_gettime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__timer_gettime) diff --git a/libc/arch-x86_64/syscalls/__timer_settime.S b/libc/arch-x86_64/syscalls/__timer_settime.S index f5401a048..e57cc9403 100644 --- a/libc/arch-x86_64/syscalls/__timer_settime.S +++ b/libc/arch-x86_64/syscalls/__timer_settime.S @@ -10,7 +10,7 @@ ENTRY(__timer_settime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__timer_settime) diff --git a/libc/arch-x86_64/syscalls/__waitid.S b/libc/arch-x86_64/syscalls/__waitid.S index 229f20c5f..e34ab538c 100644 --- a/libc/arch-x86_64/syscalls/__waitid.S +++ b/libc/arch-x86_64/syscalls/__waitid.S @@ -10,7 +10,7 @@ ENTRY(__waitid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(__waitid) diff --git a/libc/arch-x86_64/syscalls/_exit.S b/libc/arch-x86_64/syscalls/_exit.S index 9c80f0031..2ad61c07b 100644 --- a/libc/arch-x86_64/syscalls/_exit.S +++ b/libc/arch-x86_64/syscalls/_exit.S @@ -9,7 +9,7 @@ ENTRY(_exit) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(_exit) diff --git a/libc/arch-x86_64/syscalls/acct.S b/libc/arch-x86_64/syscalls/acct.S index 91ecf5b78..221a1bfd1 100644 --- a/libc/arch-x86_64/syscalls/acct.S +++ b/libc/arch-x86_64/syscalls/acct.S @@ -9,7 +9,7 @@ ENTRY(acct) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(acct) diff --git a/libc/arch-x86_64/syscalls/bind.S b/libc/arch-x86_64/syscalls/bind.S index 5d426cbbc..223ec8ca7 100644 --- a/libc/arch-x86_64/syscalls/bind.S +++ b/libc/arch-x86_64/syscalls/bind.S @@ -9,7 +9,7 @@ ENTRY(bind) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(bind) diff --git a/libc/arch-x86_64/syscalls/capget.S b/libc/arch-x86_64/syscalls/capget.S index d3d151ef1..1c8eb8c03 100644 --- a/libc/arch-x86_64/syscalls/capget.S +++ b/libc/arch-x86_64/syscalls/capget.S @@ -9,7 +9,7 @@ ENTRY(capget) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(capget) diff --git a/libc/arch-x86_64/syscalls/capset.S b/libc/arch-x86_64/syscalls/capset.S index 421f15623..b7356de77 100644 --- a/libc/arch-x86_64/syscalls/capset.S +++ b/libc/arch-x86_64/syscalls/capset.S @@ -9,7 +9,7 @@ ENTRY(capset) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(capset) diff --git a/libc/arch-x86_64/syscalls/chdir.S b/libc/arch-x86_64/syscalls/chdir.S index 7a6f651e4..6735af6f3 100644 --- a/libc/arch-x86_64/syscalls/chdir.S +++ b/libc/arch-x86_64/syscalls/chdir.S @@ -9,7 +9,7 @@ ENTRY(chdir) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(chdir) diff --git a/libc/arch-x86_64/syscalls/chroot.S b/libc/arch-x86_64/syscalls/chroot.S index 0f53fd95a..95bec095d 100644 --- a/libc/arch-x86_64/syscalls/chroot.S +++ b/libc/arch-x86_64/syscalls/chroot.S @@ -9,7 +9,7 @@ ENTRY(chroot) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(chroot) diff --git a/libc/arch-x86_64/syscalls/clock_getres.S b/libc/arch-x86_64/syscalls/clock_getres.S index bad0d782e..c89c9baf6 100644 --- a/libc/arch-x86_64/syscalls/clock_getres.S +++ b/libc/arch-x86_64/syscalls/clock_getres.S @@ -9,7 +9,7 @@ ENTRY(clock_getres) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(clock_getres) diff --git a/libc/arch-x86_64/syscalls/clock_nanosleep.S b/libc/arch-x86_64/syscalls/clock_nanosleep.S index 2ef0d05c6..4cd3dfe9f 100644 --- a/libc/arch-x86_64/syscalls/clock_nanosleep.S +++ b/libc/arch-x86_64/syscalls/clock_nanosleep.S @@ -10,7 +10,7 @@ ENTRY(clock_nanosleep) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(clock_nanosleep) diff --git a/libc/arch-x86_64/syscalls/clock_settime.S b/libc/arch-x86_64/syscalls/clock_settime.S index 6a3b75b54..49084ec30 100644 --- a/libc/arch-x86_64/syscalls/clock_settime.S +++ b/libc/arch-x86_64/syscalls/clock_settime.S @@ -9,7 +9,7 @@ ENTRY(clock_settime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(clock_settime) diff --git a/libc/arch-x86_64/syscalls/close.S b/libc/arch-x86_64/syscalls/close.S index 41c840374..c7e32f366 100644 --- a/libc/arch-x86_64/syscalls/close.S +++ b/libc/arch-x86_64/syscalls/close.S @@ -9,7 +9,7 @@ ENTRY(close) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(close) diff --git a/libc/arch-x86_64/syscalls/delete_module.S b/libc/arch-x86_64/syscalls/delete_module.S index d3f3862cb..ea6684d5a 100644 --- a/libc/arch-x86_64/syscalls/delete_module.S +++ b/libc/arch-x86_64/syscalls/delete_module.S @@ -9,7 +9,7 @@ ENTRY(delete_module) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(delete_module) diff --git a/libc/arch-x86_64/syscalls/dup.S b/libc/arch-x86_64/syscalls/dup.S index bf2ca517e..e4e94066d 100644 --- a/libc/arch-x86_64/syscalls/dup.S +++ b/libc/arch-x86_64/syscalls/dup.S @@ -9,7 +9,7 @@ ENTRY(dup) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(dup) diff --git a/libc/arch-x86_64/syscalls/dup3.S b/libc/arch-x86_64/syscalls/dup3.S index f5c929c46..63c20b967 100644 --- a/libc/arch-x86_64/syscalls/dup3.S +++ b/libc/arch-x86_64/syscalls/dup3.S @@ -9,7 +9,7 @@ ENTRY(dup3) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(dup3) diff --git a/libc/arch-x86_64/syscalls/epoll_create1.S b/libc/arch-x86_64/syscalls/epoll_create1.S index 196a3c7c8..4eaf0ff04 100644 --- a/libc/arch-x86_64/syscalls/epoll_create1.S +++ b/libc/arch-x86_64/syscalls/epoll_create1.S @@ -9,7 +9,7 @@ ENTRY(epoll_create1) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(epoll_create1) diff --git a/libc/arch-x86_64/syscalls/epoll_ctl.S b/libc/arch-x86_64/syscalls/epoll_ctl.S index 2a3517cca..790322343 100644 --- a/libc/arch-x86_64/syscalls/epoll_ctl.S +++ b/libc/arch-x86_64/syscalls/epoll_ctl.S @@ -10,7 +10,7 @@ ENTRY(epoll_ctl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(epoll_ctl) diff --git a/libc/arch-x86_64/syscalls/eventfd.S b/libc/arch-x86_64/syscalls/eventfd.S index 3ed4baff0..10d8b85a2 100644 --- a/libc/arch-x86_64/syscalls/eventfd.S +++ b/libc/arch-x86_64/syscalls/eventfd.S @@ -9,7 +9,7 @@ ENTRY(eventfd) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(eventfd) diff --git a/libc/arch-x86_64/syscalls/execve.S b/libc/arch-x86_64/syscalls/execve.S index 1fe29c73c..218329c04 100644 --- a/libc/arch-x86_64/syscalls/execve.S +++ b/libc/arch-x86_64/syscalls/execve.S @@ -9,7 +9,7 @@ ENTRY(execve) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(execve) diff --git a/libc/arch-x86_64/syscalls/faccessat.S b/libc/arch-x86_64/syscalls/faccessat.S index 3ea905c42..dd908e32e 100644 --- a/libc/arch-x86_64/syscalls/faccessat.S +++ b/libc/arch-x86_64/syscalls/faccessat.S @@ -10,7 +10,7 @@ ENTRY(faccessat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(faccessat) diff --git a/libc/arch-x86_64/syscalls/fallocate.S b/libc/arch-x86_64/syscalls/fallocate.S index abaa303c5..4997f02ea 100644 --- a/libc/arch-x86_64/syscalls/fallocate.S +++ b/libc/arch-x86_64/syscalls/fallocate.S @@ -10,7 +10,7 @@ ENTRY(fallocate) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fallocate) diff --git a/libc/arch-x86_64/syscalls/fchdir.S b/libc/arch-x86_64/syscalls/fchdir.S index b01bb5702..6bb4929f5 100644 --- a/libc/arch-x86_64/syscalls/fchdir.S +++ b/libc/arch-x86_64/syscalls/fchdir.S @@ -9,7 +9,7 @@ ENTRY(fchdir) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fchdir) diff --git a/libc/arch-x86_64/syscalls/fchmod.S b/libc/arch-x86_64/syscalls/fchmod.S index 868638f05..899d796d8 100644 --- a/libc/arch-x86_64/syscalls/fchmod.S +++ b/libc/arch-x86_64/syscalls/fchmod.S @@ -9,7 +9,7 @@ ENTRY(fchmod) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fchmod) diff --git a/libc/arch-x86_64/syscalls/fchmodat.S b/libc/arch-x86_64/syscalls/fchmodat.S index e045a1311..588fa1df1 100644 --- a/libc/arch-x86_64/syscalls/fchmodat.S +++ b/libc/arch-x86_64/syscalls/fchmodat.S @@ -10,7 +10,7 @@ ENTRY(fchmodat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fchmodat) diff --git a/libc/arch-x86_64/syscalls/fchown.S b/libc/arch-x86_64/syscalls/fchown.S index 9ba775b6e..80c028333 100644 --- a/libc/arch-x86_64/syscalls/fchown.S +++ b/libc/arch-x86_64/syscalls/fchown.S @@ -9,7 +9,7 @@ ENTRY(fchown) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fchown) diff --git a/libc/arch-x86_64/syscalls/fchownat.S b/libc/arch-x86_64/syscalls/fchownat.S index 7789d2ddd..74853b74a 100644 --- a/libc/arch-x86_64/syscalls/fchownat.S +++ b/libc/arch-x86_64/syscalls/fchownat.S @@ -10,7 +10,7 @@ ENTRY(fchownat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fchownat) diff --git a/libc/arch-x86_64/syscalls/fcntl.S b/libc/arch-x86_64/syscalls/fcntl.S index a20d9389c..909e568d3 100644 --- a/libc/arch-x86_64/syscalls/fcntl.S +++ b/libc/arch-x86_64/syscalls/fcntl.S @@ -9,7 +9,7 @@ ENTRY(fcntl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fcntl) diff --git a/libc/arch-x86_64/syscalls/fdatasync.S b/libc/arch-x86_64/syscalls/fdatasync.S index 5ea8ebd8c..43e368ff3 100644 --- a/libc/arch-x86_64/syscalls/fdatasync.S +++ b/libc/arch-x86_64/syscalls/fdatasync.S @@ -9,7 +9,7 @@ ENTRY(fdatasync) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fdatasync) diff --git a/libc/arch-x86_64/syscalls/fgetxattr.S b/libc/arch-x86_64/syscalls/fgetxattr.S index 096c30f05..56e558087 100644 --- a/libc/arch-x86_64/syscalls/fgetxattr.S +++ b/libc/arch-x86_64/syscalls/fgetxattr.S @@ -10,7 +10,7 @@ ENTRY(fgetxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fgetxattr) diff --git a/libc/arch-x86_64/syscalls/flistxattr.S b/libc/arch-x86_64/syscalls/flistxattr.S index e0e5b8bc8..da77c72bf 100644 --- a/libc/arch-x86_64/syscalls/flistxattr.S +++ b/libc/arch-x86_64/syscalls/flistxattr.S @@ -9,7 +9,7 @@ ENTRY(flistxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(flistxattr) diff --git a/libc/arch-x86_64/syscalls/flock.S b/libc/arch-x86_64/syscalls/flock.S index 981d86ed1..30daa4855 100644 --- a/libc/arch-x86_64/syscalls/flock.S +++ b/libc/arch-x86_64/syscalls/flock.S @@ -9,7 +9,7 @@ ENTRY(flock) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(flock) diff --git a/libc/arch-x86_64/syscalls/fremovexattr.S b/libc/arch-x86_64/syscalls/fremovexattr.S index 655bdef85..f4536e28e 100644 --- a/libc/arch-x86_64/syscalls/fremovexattr.S +++ b/libc/arch-x86_64/syscalls/fremovexattr.S @@ -9,7 +9,7 @@ ENTRY(fremovexattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fremovexattr) diff --git a/libc/arch-x86_64/syscalls/fsetxattr.S b/libc/arch-x86_64/syscalls/fsetxattr.S index fa2bddca7..dcc411922 100644 --- a/libc/arch-x86_64/syscalls/fsetxattr.S +++ b/libc/arch-x86_64/syscalls/fsetxattr.S @@ -10,7 +10,7 @@ ENTRY(fsetxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fsetxattr) diff --git a/libc/arch-x86_64/syscalls/fstat64.S b/libc/arch-x86_64/syscalls/fstat64.S index 9e7aa2dd6..40db72224 100644 --- a/libc/arch-x86_64/syscalls/fstat64.S +++ b/libc/arch-x86_64/syscalls/fstat64.S @@ -9,7 +9,7 @@ ENTRY(fstat64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fstat64) diff --git a/libc/arch-x86_64/syscalls/fstatat64.S b/libc/arch-x86_64/syscalls/fstatat64.S index 5418cd0af..fe6fcd232 100644 --- a/libc/arch-x86_64/syscalls/fstatat64.S +++ b/libc/arch-x86_64/syscalls/fstatat64.S @@ -10,7 +10,7 @@ ENTRY(fstatat64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fstatat64) diff --git a/libc/arch-x86_64/syscalls/fstatfs64.S b/libc/arch-x86_64/syscalls/fstatfs64.S index ee2daa2df..39a6dafbf 100644 --- a/libc/arch-x86_64/syscalls/fstatfs64.S +++ b/libc/arch-x86_64/syscalls/fstatfs64.S @@ -9,7 +9,7 @@ ENTRY(fstatfs64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fstatfs64) diff --git a/libc/arch-x86_64/syscalls/fsync.S b/libc/arch-x86_64/syscalls/fsync.S index 12eabd325..f53ce5cf5 100644 --- a/libc/arch-x86_64/syscalls/fsync.S +++ b/libc/arch-x86_64/syscalls/fsync.S @@ -9,7 +9,7 @@ ENTRY(fsync) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(fsync) diff --git a/libc/arch-x86_64/syscalls/ftruncate.S b/libc/arch-x86_64/syscalls/ftruncate.S index 11161a7cd..5da7bc568 100644 --- a/libc/arch-x86_64/syscalls/ftruncate.S +++ b/libc/arch-x86_64/syscalls/ftruncate.S @@ -9,7 +9,7 @@ ENTRY(ftruncate) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(ftruncate) diff --git a/libc/arch-x86_64/syscalls/getegid.S b/libc/arch-x86_64/syscalls/getegid.S index 6f9c2a80f..9939d2014 100644 --- a/libc/arch-x86_64/syscalls/getegid.S +++ b/libc/arch-x86_64/syscalls/getegid.S @@ -9,7 +9,7 @@ ENTRY(getegid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getegid) diff --git a/libc/arch-x86_64/syscalls/geteuid.S b/libc/arch-x86_64/syscalls/geteuid.S index 88000ef05..399bc10af 100644 --- a/libc/arch-x86_64/syscalls/geteuid.S +++ b/libc/arch-x86_64/syscalls/geteuid.S @@ -9,7 +9,7 @@ ENTRY(geteuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(geteuid) diff --git a/libc/arch-x86_64/syscalls/getgid.S b/libc/arch-x86_64/syscalls/getgid.S index 8f8eaa6fe..2a0a89523 100644 --- a/libc/arch-x86_64/syscalls/getgid.S +++ b/libc/arch-x86_64/syscalls/getgid.S @@ -9,7 +9,7 @@ ENTRY(getgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getgid) diff --git a/libc/arch-x86_64/syscalls/getgroups.S b/libc/arch-x86_64/syscalls/getgroups.S index 5358a3e6f..6110b5ae9 100644 --- a/libc/arch-x86_64/syscalls/getgroups.S +++ b/libc/arch-x86_64/syscalls/getgroups.S @@ -9,7 +9,7 @@ ENTRY(getgroups) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getgroups) diff --git a/libc/arch-x86_64/syscalls/getitimer.S b/libc/arch-x86_64/syscalls/getitimer.S index b6a6e8e5c..76ac8568e 100644 --- a/libc/arch-x86_64/syscalls/getitimer.S +++ b/libc/arch-x86_64/syscalls/getitimer.S @@ -9,7 +9,7 @@ ENTRY(getitimer) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getitimer) diff --git a/libc/arch-x86_64/syscalls/getpeername.S b/libc/arch-x86_64/syscalls/getpeername.S index 98e06fb89..22ad98e8b 100644 --- a/libc/arch-x86_64/syscalls/getpeername.S +++ b/libc/arch-x86_64/syscalls/getpeername.S @@ -9,7 +9,7 @@ ENTRY(getpeername) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getpeername) diff --git a/libc/arch-x86_64/syscalls/getpgid.S b/libc/arch-x86_64/syscalls/getpgid.S index 158f14de6..51d2e7247 100644 --- a/libc/arch-x86_64/syscalls/getpgid.S +++ b/libc/arch-x86_64/syscalls/getpgid.S @@ -9,7 +9,7 @@ ENTRY(getpgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getpgid) diff --git a/libc/arch-x86_64/syscalls/getppid.S b/libc/arch-x86_64/syscalls/getppid.S index e4853e0d8..44e8cd982 100644 --- a/libc/arch-x86_64/syscalls/getppid.S +++ b/libc/arch-x86_64/syscalls/getppid.S @@ -9,7 +9,7 @@ ENTRY(getppid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getppid) diff --git a/libc/arch-x86_64/syscalls/getresgid.S b/libc/arch-x86_64/syscalls/getresgid.S index d65fb1392..dab4f4334 100644 --- a/libc/arch-x86_64/syscalls/getresgid.S +++ b/libc/arch-x86_64/syscalls/getresgid.S @@ -9,7 +9,7 @@ ENTRY(getresgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getresgid) diff --git a/libc/arch-x86_64/syscalls/getresuid.S b/libc/arch-x86_64/syscalls/getresuid.S index 80d85c676..5c433a96c 100644 --- a/libc/arch-x86_64/syscalls/getresuid.S +++ b/libc/arch-x86_64/syscalls/getresuid.S @@ -9,7 +9,7 @@ ENTRY(getresuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getresuid) diff --git a/libc/arch-x86_64/syscalls/getrlimit.S b/libc/arch-x86_64/syscalls/getrlimit.S index ea0ca7da0..5c0dd0808 100644 --- a/libc/arch-x86_64/syscalls/getrlimit.S +++ b/libc/arch-x86_64/syscalls/getrlimit.S @@ -9,7 +9,7 @@ ENTRY(getrlimit) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getrlimit) diff --git a/libc/arch-x86_64/syscalls/getrusage.S b/libc/arch-x86_64/syscalls/getrusage.S index 7a60738bd..01750f2f4 100644 --- a/libc/arch-x86_64/syscalls/getrusage.S +++ b/libc/arch-x86_64/syscalls/getrusage.S @@ -9,7 +9,7 @@ ENTRY(getrusage) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getrusage) diff --git a/libc/arch-x86_64/syscalls/getsid.S b/libc/arch-x86_64/syscalls/getsid.S index 75e3fad98..63e7ce099 100644 --- a/libc/arch-x86_64/syscalls/getsid.S +++ b/libc/arch-x86_64/syscalls/getsid.S @@ -9,7 +9,7 @@ ENTRY(getsid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getsid) diff --git a/libc/arch-x86_64/syscalls/getsockname.S b/libc/arch-x86_64/syscalls/getsockname.S index 3c7c2f852..62b4eb8fd 100644 --- a/libc/arch-x86_64/syscalls/getsockname.S +++ b/libc/arch-x86_64/syscalls/getsockname.S @@ -9,7 +9,7 @@ ENTRY(getsockname) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getsockname) diff --git a/libc/arch-x86_64/syscalls/getsockopt.S b/libc/arch-x86_64/syscalls/getsockopt.S index 725757cd8..dc62ce9ff 100644 --- a/libc/arch-x86_64/syscalls/getsockopt.S +++ b/libc/arch-x86_64/syscalls/getsockopt.S @@ -10,7 +10,7 @@ ENTRY(getsockopt) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getsockopt) diff --git a/libc/arch-x86_64/syscalls/getuid.S b/libc/arch-x86_64/syscalls/getuid.S index d7306e160..0229ae5a0 100644 --- a/libc/arch-x86_64/syscalls/getuid.S +++ b/libc/arch-x86_64/syscalls/getuid.S @@ -9,7 +9,7 @@ ENTRY(getuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getuid) diff --git a/libc/arch-x86_64/syscalls/getxattr.S b/libc/arch-x86_64/syscalls/getxattr.S index 7c66b0e4b..28354a590 100644 --- a/libc/arch-x86_64/syscalls/getxattr.S +++ b/libc/arch-x86_64/syscalls/getxattr.S @@ -10,7 +10,7 @@ ENTRY(getxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(getxattr) diff --git a/libc/arch-x86_64/syscalls/init_module.S b/libc/arch-x86_64/syscalls/init_module.S index 187f5a277..4532fdd38 100644 --- a/libc/arch-x86_64/syscalls/init_module.S +++ b/libc/arch-x86_64/syscalls/init_module.S @@ -9,7 +9,7 @@ ENTRY(init_module) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(init_module) diff --git a/libc/arch-x86_64/syscalls/inotify_add_watch.S b/libc/arch-x86_64/syscalls/inotify_add_watch.S index 47e15ab57..f2fb41fac 100644 --- a/libc/arch-x86_64/syscalls/inotify_add_watch.S +++ b/libc/arch-x86_64/syscalls/inotify_add_watch.S @@ -9,7 +9,7 @@ ENTRY(inotify_add_watch) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(inotify_add_watch) diff --git a/libc/arch-x86_64/syscalls/inotify_init1.S b/libc/arch-x86_64/syscalls/inotify_init1.S index 160b0d59e..e1332c7b3 100644 --- a/libc/arch-x86_64/syscalls/inotify_init1.S +++ b/libc/arch-x86_64/syscalls/inotify_init1.S @@ -9,7 +9,7 @@ ENTRY(inotify_init1) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(inotify_init1) diff --git a/libc/arch-x86_64/syscalls/inotify_rm_watch.S b/libc/arch-x86_64/syscalls/inotify_rm_watch.S index 4c5874ea4..e1dddd208 100644 --- a/libc/arch-x86_64/syscalls/inotify_rm_watch.S +++ b/libc/arch-x86_64/syscalls/inotify_rm_watch.S @@ -9,7 +9,7 @@ ENTRY(inotify_rm_watch) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(inotify_rm_watch) diff --git a/libc/arch-x86_64/syscalls/kill.S b/libc/arch-x86_64/syscalls/kill.S index f234585c8..e7b710a24 100644 --- a/libc/arch-x86_64/syscalls/kill.S +++ b/libc/arch-x86_64/syscalls/kill.S @@ -9,7 +9,7 @@ ENTRY(kill) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(kill) diff --git a/libc/arch-x86_64/syscalls/klogctl.S b/libc/arch-x86_64/syscalls/klogctl.S index 057b066c7..fdc8649f1 100644 --- a/libc/arch-x86_64/syscalls/klogctl.S +++ b/libc/arch-x86_64/syscalls/klogctl.S @@ -9,7 +9,7 @@ ENTRY(klogctl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(klogctl) diff --git a/libc/arch-x86_64/syscalls/lgetxattr.S b/libc/arch-x86_64/syscalls/lgetxattr.S index 525ee3be8..c8e1bb6a9 100644 --- a/libc/arch-x86_64/syscalls/lgetxattr.S +++ b/libc/arch-x86_64/syscalls/lgetxattr.S @@ -10,7 +10,7 @@ ENTRY(lgetxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(lgetxattr) diff --git a/libc/arch-x86_64/syscalls/linkat.S b/libc/arch-x86_64/syscalls/linkat.S index 815af86ff..2d83871d8 100644 --- a/libc/arch-x86_64/syscalls/linkat.S +++ b/libc/arch-x86_64/syscalls/linkat.S @@ -10,7 +10,7 @@ ENTRY(linkat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(linkat) diff --git a/libc/arch-x86_64/syscalls/listen.S b/libc/arch-x86_64/syscalls/listen.S index d3d7103fb..28042868a 100644 --- a/libc/arch-x86_64/syscalls/listen.S +++ b/libc/arch-x86_64/syscalls/listen.S @@ -9,7 +9,7 @@ ENTRY(listen) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(listen) diff --git a/libc/arch-x86_64/syscalls/listxattr.S b/libc/arch-x86_64/syscalls/listxattr.S index 89fd63ce2..82452f748 100644 --- a/libc/arch-x86_64/syscalls/listxattr.S +++ b/libc/arch-x86_64/syscalls/listxattr.S @@ -9,7 +9,7 @@ ENTRY(listxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(listxattr) diff --git a/libc/arch-x86_64/syscalls/llistxattr.S b/libc/arch-x86_64/syscalls/llistxattr.S index cfff2e79b..27954806e 100644 --- a/libc/arch-x86_64/syscalls/llistxattr.S +++ b/libc/arch-x86_64/syscalls/llistxattr.S @@ -9,7 +9,7 @@ ENTRY(llistxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(llistxattr) diff --git a/libc/arch-x86_64/syscalls/lremovexattr.S b/libc/arch-x86_64/syscalls/lremovexattr.S index 0b6994a52..c406aa803 100644 --- a/libc/arch-x86_64/syscalls/lremovexattr.S +++ b/libc/arch-x86_64/syscalls/lremovexattr.S @@ -9,7 +9,7 @@ ENTRY(lremovexattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(lremovexattr) diff --git a/libc/arch-x86_64/syscalls/lseek.S b/libc/arch-x86_64/syscalls/lseek.S index b2e8c16a5..f4035c4e5 100644 --- a/libc/arch-x86_64/syscalls/lseek.S +++ b/libc/arch-x86_64/syscalls/lseek.S @@ -9,7 +9,7 @@ ENTRY(lseek) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(lseek) diff --git a/libc/arch-x86_64/syscalls/lsetxattr.S b/libc/arch-x86_64/syscalls/lsetxattr.S index fdaf98ae4..9e18856e3 100644 --- a/libc/arch-x86_64/syscalls/lsetxattr.S +++ b/libc/arch-x86_64/syscalls/lsetxattr.S @@ -10,7 +10,7 @@ ENTRY(lsetxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(lsetxattr) diff --git a/libc/arch-x86_64/syscalls/madvise.S b/libc/arch-x86_64/syscalls/madvise.S index 3f567fd03..829849050 100644 --- a/libc/arch-x86_64/syscalls/madvise.S +++ b/libc/arch-x86_64/syscalls/madvise.S @@ -9,7 +9,7 @@ ENTRY(madvise) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(madvise) diff --git a/libc/arch-x86_64/syscalls/mincore.S b/libc/arch-x86_64/syscalls/mincore.S index e6b252155..194dbee5f 100644 --- a/libc/arch-x86_64/syscalls/mincore.S +++ b/libc/arch-x86_64/syscalls/mincore.S @@ -9,7 +9,7 @@ ENTRY(mincore) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mincore) diff --git a/libc/arch-x86_64/syscalls/mkdirat.S b/libc/arch-x86_64/syscalls/mkdirat.S index abba2d571..163dd6433 100644 --- a/libc/arch-x86_64/syscalls/mkdirat.S +++ b/libc/arch-x86_64/syscalls/mkdirat.S @@ -9,7 +9,7 @@ ENTRY(mkdirat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mkdirat) diff --git a/libc/arch-x86_64/syscalls/mknodat.S b/libc/arch-x86_64/syscalls/mknodat.S index d3d78c9c5..59b0df7b6 100644 --- a/libc/arch-x86_64/syscalls/mknodat.S +++ b/libc/arch-x86_64/syscalls/mknodat.S @@ -10,7 +10,7 @@ ENTRY(mknodat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mknodat) diff --git a/libc/arch-x86_64/syscalls/mlock.S b/libc/arch-x86_64/syscalls/mlock.S index 0c69eb71b..0eb8af71a 100644 --- a/libc/arch-x86_64/syscalls/mlock.S +++ b/libc/arch-x86_64/syscalls/mlock.S @@ -9,7 +9,7 @@ ENTRY(mlock) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mlock) diff --git a/libc/arch-x86_64/syscalls/mlockall.S b/libc/arch-x86_64/syscalls/mlockall.S index 89ba9b6e6..c667dca99 100644 --- a/libc/arch-x86_64/syscalls/mlockall.S +++ b/libc/arch-x86_64/syscalls/mlockall.S @@ -9,7 +9,7 @@ ENTRY(mlockall) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mlockall) diff --git a/libc/arch-x86_64/syscalls/mmap.S b/libc/arch-x86_64/syscalls/mmap.S index 7b9f6e033..83f19b5b5 100644 --- a/libc/arch-x86_64/syscalls/mmap.S +++ b/libc/arch-x86_64/syscalls/mmap.S @@ -10,7 +10,7 @@ ENTRY(mmap) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mmap) diff --git a/libc/arch-x86_64/syscalls/mount.S b/libc/arch-x86_64/syscalls/mount.S index 04534c9d3..b047444ef 100644 --- a/libc/arch-x86_64/syscalls/mount.S +++ b/libc/arch-x86_64/syscalls/mount.S @@ -10,7 +10,7 @@ ENTRY(mount) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mount) diff --git a/libc/arch-x86_64/syscalls/mprotect.S b/libc/arch-x86_64/syscalls/mprotect.S index d849bb130..fc280839c 100644 --- a/libc/arch-x86_64/syscalls/mprotect.S +++ b/libc/arch-x86_64/syscalls/mprotect.S @@ -9,7 +9,7 @@ ENTRY(mprotect) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mprotect) diff --git a/libc/arch-x86_64/syscalls/mremap.S b/libc/arch-x86_64/syscalls/mremap.S index 8af367ed8..b95f1a85b 100644 --- a/libc/arch-x86_64/syscalls/mremap.S +++ b/libc/arch-x86_64/syscalls/mremap.S @@ -10,7 +10,7 @@ ENTRY(mremap) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(mremap) diff --git a/libc/arch-x86_64/syscalls/msync.S b/libc/arch-x86_64/syscalls/msync.S index c0ff0f9b7..5d71e742c 100644 --- a/libc/arch-x86_64/syscalls/msync.S +++ b/libc/arch-x86_64/syscalls/msync.S @@ -9,7 +9,7 @@ ENTRY(msync) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(msync) diff --git a/libc/arch-x86_64/syscalls/munlock.S b/libc/arch-x86_64/syscalls/munlock.S index d669f5400..0f9a8f99f 100644 --- a/libc/arch-x86_64/syscalls/munlock.S +++ b/libc/arch-x86_64/syscalls/munlock.S @@ -9,7 +9,7 @@ ENTRY(munlock) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(munlock) diff --git a/libc/arch-x86_64/syscalls/munlockall.S b/libc/arch-x86_64/syscalls/munlockall.S index b7a9abcc7..5b52ad443 100644 --- a/libc/arch-x86_64/syscalls/munlockall.S +++ b/libc/arch-x86_64/syscalls/munlockall.S @@ -9,7 +9,7 @@ ENTRY(munlockall) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(munlockall) diff --git a/libc/arch-x86_64/syscalls/munmap.S b/libc/arch-x86_64/syscalls/munmap.S index 4360bd0b2..e83f2f69a 100644 --- a/libc/arch-x86_64/syscalls/munmap.S +++ b/libc/arch-x86_64/syscalls/munmap.S @@ -9,7 +9,7 @@ ENTRY(munmap) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(munmap) diff --git a/libc/arch-x86_64/syscalls/nanosleep.S b/libc/arch-x86_64/syscalls/nanosleep.S index 2eced5b2c..62407fef8 100644 --- a/libc/arch-x86_64/syscalls/nanosleep.S +++ b/libc/arch-x86_64/syscalls/nanosleep.S @@ -9,7 +9,7 @@ ENTRY(nanosleep) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(nanosleep) diff --git a/libc/arch-x86_64/syscalls/personality.S b/libc/arch-x86_64/syscalls/personality.S index 17ad7eeac..0e87540e2 100644 --- a/libc/arch-x86_64/syscalls/personality.S +++ b/libc/arch-x86_64/syscalls/personality.S @@ -9,7 +9,7 @@ ENTRY(personality) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(personality) diff --git a/libc/arch-x86_64/syscalls/pipe2.S b/libc/arch-x86_64/syscalls/pipe2.S index 83eb0a61b..c8c3e4c95 100644 --- a/libc/arch-x86_64/syscalls/pipe2.S +++ b/libc/arch-x86_64/syscalls/pipe2.S @@ -9,7 +9,7 @@ ENTRY(pipe2) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(pipe2) diff --git a/libc/arch-x86_64/syscalls/prctl.S b/libc/arch-x86_64/syscalls/prctl.S index c79220d44..359e31dca 100644 --- a/libc/arch-x86_64/syscalls/prctl.S +++ b/libc/arch-x86_64/syscalls/prctl.S @@ -10,7 +10,7 @@ ENTRY(prctl) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(prctl) diff --git a/libc/arch-x86_64/syscalls/pread64.S b/libc/arch-x86_64/syscalls/pread64.S index 1c4dc68da..6e6b2408e 100644 --- a/libc/arch-x86_64/syscalls/pread64.S +++ b/libc/arch-x86_64/syscalls/pread64.S @@ -10,7 +10,7 @@ ENTRY(pread64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(pread64) diff --git a/libc/arch-x86_64/syscalls/prlimit64.S b/libc/arch-x86_64/syscalls/prlimit64.S index 823feba5c..ef99f5cc6 100644 --- a/libc/arch-x86_64/syscalls/prlimit64.S +++ b/libc/arch-x86_64/syscalls/prlimit64.S @@ -10,7 +10,7 @@ ENTRY(prlimit64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(prlimit64) diff --git a/libc/arch-x86_64/syscalls/pwrite64.S b/libc/arch-x86_64/syscalls/pwrite64.S index 13bcb58bf..944c66a5c 100644 --- a/libc/arch-x86_64/syscalls/pwrite64.S +++ b/libc/arch-x86_64/syscalls/pwrite64.S @@ -10,7 +10,7 @@ ENTRY(pwrite64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(pwrite64) diff --git a/libc/arch-x86_64/syscalls/read.S b/libc/arch-x86_64/syscalls/read.S index 400c87ac8..960ea250f 100644 --- a/libc/arch-x86_64/syscalls/read.S +++ b/libc/arch-x86_64/syscalls/read.S @@ -9,7 +9,7 @@ ENTRY(read) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(read) diff --git a/libc/arch-x86_64/syscalls/readahead.S b/libc/arch-x86_64/syscalls/readahead.S index 2a2978ba3..4f9ef4ee6 100644 --- a/libc/arch-x86_64/syscalls/readahead.S +++ b/libc/arch-x86_64/syscalls/readahead.S @@ -9,7 +9,7 @@ ENTRY(readahead) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(readahead) diff --git a/libc/arch-x86_64/syscalls/readlinkat.S b/libc/arch-x86_64/syscalls/readlinkat.S index 51d1f0c7e..cefa09f6a 100644 --- a/libc/arch-x86_64/syscalls/readlinkat.S +++ b/libc/arch-x86_64/syscalls/readlinkat.S @@ -10,7 +10,7 @@ ENTRY(readlinkat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(readlinkat) diff --git a/libc/arch-x86_64/syscalls/readv.S b/libc/arch-x86_64/syscalls/readv.S index 419975183..f2eed7fdc 100644 --- a/libc/arch-x86_64/syscalls/readv.S +++ b/libc/arch-x86_64/syscalls/readv.S @@ -9,7 +9,7 @@ ENTRY(readv) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(readv) diff --git a/libc/arch-x86_64/syscalls/recvfrom.S b/libc/arch-x86_64/syscalls/recvfrom.S index 61ca1b219..99e7e871e 100644 --- a/libc/arch-x86_64/syscalls/recvfrom.S +++ b/libc/arch-x86_64/syscalls/recvfrom.S @@ -10,7 +10,7 @@ ENTRY(recvfrom) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(recvfrom) diff --git a/libc/arch-x86_64/syscalls/recvmmsg.S b/libc/arch-x86_64/syscalls/recvmmsg.S index ce14ba50c..89f9f86f2 100644 --- a/libc/arch-x86_64/syscalls/recvmmsg.S +++ b/libc/arch-x86_64/syscalls/recvmmsg.S @@ -10,7 +10,7 @@ ENTRY(recvmmsg) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(recvmmsg) diff --git a/libc/arch-x86_64/syscalls/recvmsg.S b/libc/arch-x86_64/syscalls/recvmsg.S index 8655d072d..5f44aebbd 100644 --- a/libc/arch-x86_64/syscalls/recvmsg.S +++ b/libc/arch-x86_64/syscalls/recvmsg.S @@ -9,7 +9,7 @@ ENTRY(recvmsg) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(recvmsg) diff --git a/libc/arch-x86_64/syscalls/removexattr.S b/libc/arch-x86_64/syscalls/removexattr.S index 97364633f..92cce02b8 100644 --- a/libc/arch-x86_64/syscalls/removexattr.S +++ b/libc/arch-x86_64/syscalls/removexattr.S @@ -9,7 +9,7 @@ ENTRY(removexattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(removexattr) diff --git a/libc/arch-x86_64/syscalls/renameat.S b/libc/arch-x86_64/syscalls/renameat.S index 0be2ef909..09511210f 100644 --- a/libc/arch-x86_64/syscalls/renameat.S +++ b/libc/arch-x86_64/syscalls/renameat.S @@ -10,7 +10,7 @@ ENTRY(renameat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(renameat) diff --git a/libc/arch-x86_64/syscalls/sched_get_priority_max.S b/libc/arch-x86_64/syscalls/sched_get_priority_max.S index 0f9273942..827327d40 100644 --- a/libc/arch-x86_64/syscalls/sched_get_priority_max.S +++ b/libc/arch-x86_64/syscalls/sched_get_priority_max.S @@ -9,7 +9,7 @@ ENTRY(sched_get_priority_max) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_get_priority_max) diff --git a/libc/arch-x86_64/syscalls/sched_get_priority_min.S b/libc/arch-x86_64/syscalls/sched_get_priority_min.S index 8450e9db3..5c3c51baa 100644 --- a/libc/arch-x86_64/syscalls/sched_get_priority_min.S +++ b/libc/arch-x86_64/syscalls/sched_get_priority_min.S @@ -9,7 +9,7 @@ ENTRY(sched_get_priority_min) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_get_priority_min) diff --git a/libc/arch-x86_64/syscalls/sched_getparam.S b/libc/arch-x86_64/syscalls/sched_getparam.S index a784640a0..1bd47e3ae 100644 --- a/libc/arch-x86_64/syscalls/sched_getparam.S +++ b/libc/arch-x86_64/syscalls/sched_getparam.S @@ -9,7 +9,7 @@ ENTRY(sched_getparam) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_getparam) diff --git a/libc/arch-x86_64/syscalls/sched_getscheduler.S b/libc/arch-x86_64/syscalls/sched_getscheduler.S index 090b32246..12d572045 100644 --- a/libc/arch-x86_64/syscalls/sched_getscheduler.S +++ b/libc/arch-x86_64/syscalls/sched_getscheduler.S @@ -9,7 +9,7 @@ ENTRY(sched_getscheduler) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_getscheduler) diff --git a/libc/arch-x86_64/syscalls/sched_rr_get_interval.S b/libc/arch-x86_64/syscalls/sched_rr_get_interval.S index 0977f2ed9..3e9959d02 100644 --- a/libc/arch-x86_64/syscalls/sched_rr_get_interval.S +++ b/libc/arch-x86_64/syscalls/sched_rr_get_interval.S @@ -9,7 +9,7 @@ ENTRY(sched_rr_get_interval) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_rr_get_interval) diff --git a/libc/arch-x86_64/syscalls/sched_setaffinity.S b/libc/arch-x86_64/syscalls/sched_setaffinity.S index af8e7a2ae..ea6b2b84d 100644 --- a/libc/arch-x86_64/syscalls/sched_setaffinity.S +++ b/libc/arch-x86_64/syscalls/sched_setaffinity.S @@ -9,7 +9,7 @@ ENTRY(sched_setaffinity) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_setaffinity) diff --git a/libc/arch-x86_64/syscalls/sched_setparam.S b/libc/arch-x86_64/syscalls/sched_setparam.S index 2964607db..189be2625 100644 --- a/libc/arch-x86_64/syscalls/sched_setparam.S +++ b/libc/arch-x86_64/syscalls/sched_setparam.S @@ -9,7 +9,7 @@ ENTRY(sched_setparam) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_setparam) diff --git a/libc/arch-x86_64/syscalls/sched_setscheduler.S b/libc/arch-x86_64/syscalls/sched_setscheduler.S index 333d1b86c..2fe87a26d 100644 --- a/libc/arch-x86_64/syscalls/sched_setscheduler.S +++ b/libc/arch-x86_64/syscalls/sched_setscheduler.S @@ -9,7 +9,7 @@ ENTRY(sched_setscheduler) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_setscheduler) diff --git a/libc/arch-x86_64/syscalls/sched_yield.S b/libc/arch-x86_64/syscalls/sched_yield.S index a97215462..8a7da9852 100644 --- a/libc/arch-x86_64/syscalls/sched_yield.S +++ b/libc/arch-x86_64/syscalls/sched_yield.S @@ -9,7 +9,7 @@ ENTRY(sched_yield) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sched_yield) diff --git a/libc/arch-x86_64/syscalls/sendfile.S b/libc/arch-x86_64/syscalls/sendfile.S index c1b6497b8..ccb7e0b2b 100644 --- a/libc/arch-x86_64/syscalls/sendfile.S +++ b/libc/arch-x86_64/syscalls/sendfile.S @@ -10,7 +10,7 @@ ENTRY(sendfile) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sendfile) diff --git a/libc/arch-x86_64/syscalls/sendmmsg.S b/libc/arch-x86_64/syscalls/sendmmsg.S index 940c0b6ee..00efcf7a4 100644 --- a/libc/arch-x86_64/syscalls/sendmmsg.S +++ b/libc/arch-x86_64/syscalls/sendmmsg.S @@ -10,7 +10,7 @@ ENTRY(sendmmsg) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sendmmsg) diff --git a/libc/arch-x86_64/syscalls/sendmsg.S b/libc/arch-x86_64/syscalls/sendmsg.S index 6d94bb691..ca8aeafc9 100644 --- a/libc/arch-x86_64/syscalls/sendmsg.S +++ b/libc/arch-x86_64/syscalls/sendmsg.S @@ -9,7 +9,7 @@ ENTRY(sendmsg) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sendmsg) diff --git a/libc/arch-x86_64/syscalls/sendto.S b/libc/arch-x86_64/syscalls/sendto.S index bfe46361f..8f02b316f 100644 --- a/libc/arch-x86_64/syscalls/sendto.S +++ b/libc/arch-x86_64/syscalls/sendto.S @@ -10,7 +10,7 @@ ENTRY(sendto) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sendto) diff --git a/libc/arch-x86_64/syscalls/setfsgid.S b/libc/arch-x86_64/syscalls/setfsgid.S index e9f50b80d..ae0f61c41 100644 --- a/libc/arch-x86_64/syscalls/setfsgid.S +++ b/libc/arch-x86_64/syscalls/setfsgid.S @@ -9,7 +9,7 @@ ENTRY(setfsgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setfsgid) diff --git a/libc/arch-x86_64/syscalls/setfsuid.S b/libc/arch-x86_64/syscalls/setfsuid.S index cfdb86cc8..334562813 100644 --- a/libc/arch-x86_64/syscalls/setfsuid.S +++ b/libc/arch-x86_64/syscalls/setfsuid.S @@ -9,7 +9,7 @@ ENTRY(setfsuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setfsuid) diff --git a/libc/arch-x86_64/syscalls/setgid.S b/libc/arch-x86_64/syscalls/setgid.S index ef4fb31b9..28eba22f1 100644 --- a/libc/arch-x86_64/syscalls/setgid.S +++ b/libc/arch-x86_64/syscalls/setgid.S @@ -9,7 +9,7 @@ ENTRY(setgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setgid) diff --git a/libc/arch-x86_64/syscalls/setgroups.S b/libc/arch-x86_64/syscalls/setgroups.S index 65e618072..ef12d2ad3 100644 --- a/libc/arch-x86_64/syscalls/setgroups.S +++ b/libc/arch-x86_64/syscalls/setgroups.S @@ -9,7 +9,7 @@ ENTRY(setgroups) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setgroups) diff --git a/libc/arch-x86_64/syscalls/setitimer.S b/libc/arch-x86_64/syscalls/setitimer.S index bee4996c2..34777b394 100644 --- a/libc/arch-x86_64/syscalls/setitimer.S +++ b/libc/arch-x86_64/syscalls/setitimer.S @@ -9,7 +9,7 @@ ENTRY(setitimer) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setitimer) diff --git a/libc/arch-x86_64/syscalls/setns.S b/libc/arch-x86_64/syscalls/setns.S index 521769b91..2ef5f18b4 100644 --- a/libc/arch-x86_64/syscalls/setns.S +++ b/libc/arch-x86_64/syscalls/setns.S @@ -9,7 +9,7 @@ ENTRY(setns) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setns) diff --git a/libc/arch-x86_64/syscalls/setpgid.S b/libc/arch-x86_64/syscalls/setpgid.S index 348612bd7..9146d5655 100644 --- a/libc/arch-x86_64/syscalls/setpgid.S +++ b/libc/arch-x86_64/syscalls/setpgid.S @@ -9,7 +9,7 @@ ENTRY(setpgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setpgid) diff --git a/libc/arch-x86_64/syscalls/setpriority.S b/libc/arch-x86_64/syscalls/setpriority.S index 094036816..74623d2a3 100644 --- a/libc/arch-x86_64/syscalls/setpriority.S +++ b/libc/arch-x86_64/syscalls/setpriority.S @@ -9,7 +9,7 @@ ENTRY(setpriority) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setpriority) diff --git a/libc/arch-x86_64/syscalls/setregid.S b/libc/arch-x86_64/syscalls/setregid.S index 0338ecf90..3bb9c834a 100644 --- a/libc/arch-x86_64/syscalls/setregid.S +++ b/libc/arch-x86_64/syscalls/setregid.S @@ -9,7 +9,7 @@ ENTRY(setregid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setregid) diff --git a/libc/arch-x86_64/syscalls/setresgid.S b/libc/arch-x86_64/syscalls/setresgid.S index 10e12447e..479ae3888 100644 --- a/libc/arch-x86_64/syscalls/setresgid.S +++ b/libc/arch-x86_64/syscalls/setresgid.S @@ -9,7 +9,7 @@ ENTRY(setresgid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setresgid) diff --git a/libc/arch-x86_64/syscalls/setresuid.S b/libc/arch-x86_64/syscalls/setresuid.S index 229b11b33..3997656fb 100644 --- a/libc/arch-x86_64/syscalls/setresuid.S +++ b/libc/arch-x86_64/syscalls/setresuid.S @@ -9,7 +9,7 @@ ENTRY(setresuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setresuid) diff --git a/libc/arch-x86_64/syscalls/setreuid.S b/libc/arch-x86_64/syscalls/setreuid.S index e96e2d386..6cfdbd56f 100644 --- a/libc/arch-x86_64/syscalls/setreuid.S +++ b/libc/arch-x86_64/syscalls/setreuid.S @@ -9,7 +9,7 @@ ENTRY(setreuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setreuid) diff --git a/libc/arch-x86_64/syscalls/setrlimit.S b/libc/arch-x86_64/syscalls/setrlimit.S index 662587d48..0aa6cf3bd 100644 --- a/libc/arch-x86_64/syscalls/setrlimit.S +++ b/libc/arch-x86_64/syscalls/setrlimit.S @@ -9,7 +9,7 @@ ENTRY(setrlimit) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setrlimit) diff --git a/libc/arch-x86_64/syscalls/setsid.S b/libc/arch-x86_64/syscalls/setsid.S index 293ecf555..e221f4068 100644 --- a/libc/arch-x86_64/syscalls/setsid.S +++ b/libc/arch-x86_64/syscalls/setsid.S @@ -9,7 +9,7 @@ ENTRY(setsid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setsid) diff --git a/libc/arch-x86_64/syscalls/setsockopt.S b/libc/arch-x86_64/syscalls/setsockopt.S index aee661391..a9853b9af 100644 --- a/libc/arch-x86_64/syscalls/setsockopt.S +++ b/libc/arch-x86_64/syscalls/setsockopt.S @@ -10,7 +10,7 @@ ENTRY(setsockopt) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setsockopt) diff --git a/libc/arch-x86_64/syscalls/settimeofday.S b/libc/arch-x86_64/syscalls/settimeofday.S index 0d00c8947..dfcf80f51 100644 --- a/libc/arch-x86_64/syscalls/settimeofday.S +++ b/libc/arch-x86_64/syscalls/settimeofday.S @@ -9,7 +9,7 @@ ENTRY(settimeofday) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(settimeofday) diff --git a/libc/arch-x86_64/syscalls/setuid.S b/libc/arch-x86_64/syscalls/setuid.S index 19e2a1042..f7b008e86 100644 --- a/libc/arch-x86_64/syscalls/setuid.S +++ b/libc/arch-x86_64/syscalls/setuid.S @@ -9,7 +9,7 @@ ENTRY(setuid) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setuid) diff --git a/libc/arch-x86_64/syscalls/setxattr.S b/libc/arch-x86_64/syscalls/setxattr.S index 3e4d50bf0..9c0adc17f 100644 --- a/libc/arch-x86_64/syscalls/setxattr.S +++ b/libc/arch-x86_64/syscalls/setxattr.S @@ -10,7 +10,7 @@ ENTRY(setxattr) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(setxattr) diff --git a/libc/arch-x86_64/syscalls/shutdown.S b/libc/arch-x86_64/syscalls/shutdown.S index 346be331d..7bf28517e 100644 --- a/libc/arch-x86_64/syscalls/shutdown.S +++ b/libc/arch-x86_64/syscalls/shutdown.S @@ -9,7 +9,7 @@ ENTRY(shutdown) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(shutdown) diff --git a/libc/arch-x86_64/syscalls/sigaltstack.S b/libc/arch-x86_64/syscalls/sigaltstack.S index 271fafc09..1bf940916 100644 --- a/libc/arch-x86_64/syscalls/sigaltstack.S +++ b/libc/arch-x86_64/syscalls/sigaltstack.S @@ -9,7 +9,7 @@ ENTRY(sigaltstack) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sigaltstack) diff --git a/libc/arch-x86_64/syscalls/socketpair.S b/libc/arch-x86_64/syscalls/socketpair.S index 5466dc9db..260ef144c 100644 --- a/libc/arch-x86_64/syscalls/socketpair.S +++ b/libc/arch-x86_64/syscalls/socketpair.S @@ -10,7 +10,7 @@ ENTRY(socketpair) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(socketpair) diff --git a/libc/arch-x86_64/syscalls/splice.S b/libc/arch-x86_64/syscalls/splice.S index 3c245a554..027c633e0 100644 --- a/libc/arch-x86_64/syscalls/splice.S +++ b/libc/arch-x86_64/syscalls/splice.S @@ -10,7 +10,7 @@ ENTRY(splice) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(splice) diff --git a/libc/arch-x86_64/syscalls/statfs64.S b/libc/arch-x86_64/syscalls/statfs64.S index 6a2637ca3..aca8db588 100644 --- a/libc/arch-x86_64/syscalls/statfs64.S +++ b/libc/arch-x86_64/syscalls/statfs64.S @@ -9,7 +9,7 @@ ENTRY(statfs64) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(statfs64) diff --git a/libc/arch-x86_64/syscalls/swapoff.S b/libc/arch-x86_64/syscalls/swapoff.S index 7e55758ab..7ffb38d6d 100644 --- a/libc/arch-x86_64/syscalls/swapoff.S +++ b/libc/arch-x86_64/syscalls/swapoff.S @@ -9,7 +9,7 @@ ENTRY(swapoff) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(swapoff) diff --git a/libc/arch-x86_64/syscalls/swapon.S b/libc/arch-x86_64/syscalls/swapon.S index d2f5f660b..ba83f2498 100644 --- a/libc/arch-x86_64/syscalls/swapon.S +++ b/libc/arch-x86_64/syscalls/swapon.S @@ -9,7 +9,7 @@ ENTRY(swapon) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(swapon) diff --git a/libc/arch-x86_64/syscalls/symlinkat.S b/libc/arch-x86_64/syscalls/symlinkat.S index 5bbf1cbdb..f9e2fceb4 100644 --- a/libc/arch-x86_64/syscalls/symlinkat.S +++ b/libc/arch-x86_64/syscalls/symlinkat.S @@ -9,7 +9,7 @@ ENTRY(symlinkat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(symlinkat) diff --git a/libc/arch-x86_64/syscalls/sync.S b/libc/arch-x86_64/syscalls/sync.S index 991171543..8058ff37d 100644 --- a/libc/arch-x86_64/syscalls/sync.S +++ b/libc/arch-x86_64/syscalls/sync.S @@ -9,7 +9,7 @@ ENTRY(sync) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sync) diff --git a/libc/arch-x86_64/syscalls/sysinfo.S b/libc/arch-x86_64/syscalls/sysinfo.S index 104bb2ced..34a5921a6 100644 --- a/libc/arch-x86_64/syscalls/sysinfo.S +++ b/libc/arch-x86_64/syscalls/sysinfo.S @@ -9,7 +9,7 @@ ENTRY(sysinfo) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(sysinfo) diff --git a/libc/arch-x86_64/syscalls/tee.S b/libc/arch-x86_64/syscalls/tee.S index ad5698c9d..afb843af5 100644 --- a/libc/arch-x86_64/syscalls/tee.S +++ b/libc/arch-x86_64/syscalls/tee.S @@ -10,7 +10,7 @@ ENTRY(tee) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(tee) diff --git a/libc/arch-x86_64/syscalls/tgkill.S b/libc/arch-x86_64/syscalls/tgkill.S index e3b9972c7..eebdc91fa 100644 --- a/libc/arch-x86_64/syscalls/tgkill.S +++ b/libc/arch-x86_64/syscalls/tgkill.S @@ -9,7 +9,7 @@ ENTRY(tgkill) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(tgkill) diff --git a/libc/arch-x86_64/syscalls/timerfd_create.S b/libc/arch-x86_64/syscalls/timerfd_create.S index 3f1b23afc..de0c2e182 100644 --- a/libc/arch-x86_64/syscalls/timerfd_create.S +++ b/libc/arch-x86_64/syscalls/timerfd_create.S @@ -9,7 +9,7 @@ ENTRY(timerfd_create) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(timerfd_create) diff --git a/libc/arch-x86_64/syscalls/timerfd_gettime.S b/libc/arch-x86_64/syscalls/timerfd_gettime.S index b1017ad90..0c10cc495 100644 --- a/libc/arch-x86_64/syscalls/timerfd_gettime.S +++ b/libc/arch-x86_64/syscalls/timerfd_gettime.S @@ -9,7 +9,7 @@ ENTRY(timerfd_gettime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(timerfd_gettime) diff --git a/libc/arch-x86_64/syscalls/timerfd_settime.S b/libc/arch-x86_64/syscalls/timerfd_settime.S index 8610a1d4f..41afadcae 100644 --- a/libc/arch-x86_64/syscalls/timerfd_settime.S +++ b/libc/arch-x86_64/syscalls/timerfd_settime.S @@ -10,7 +10,7 @@ ENTRY(timerfd_settime) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(timerfd_settime) diff --git a/libc/arch-x86_64/syscalls/times.S b/libc/arch-x86_64/syscalls/times.S index 07590b9f3..ca961c7b8 100644 --- a/libc/arch-x86_64/syscalls/times.S +++ b/libc/arch-x86_64/syscalls/times.S @@ -9,7 +9,7 @@ ENTRY(times) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(times) diff --git a/libc/arch-x86_64/syscalls/truncate.S b/libc/arch-x86_64/syscalls/truncate.S index db2121f86..d680e2d86 100644 --- a/libc/arch-x86_64/syscalls/truncate.S +++ b/libc/arch-x86_64/syscalls/truncate.S @@ -9,7 +9,7 @@ ENTRY(truncate) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(truncate) diff --git a/libc/arch-x86_64/syscalls/umask.S b/libc/arch-x86_64/syscalls/umask.S index badea7608..590c6fe3c 100644 --- a/libc/arch-x86_64/syscalls/umask.S +++ b/libc/arch-x86_64/syscalls/umask.S @@ -9,7 +9,7 @@ ENTRY(umask) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(umask) diff --git a/libc/arch-x86_64/syscalls/umount2.S b/libc/arch-x86_64/syscalls/umount2.S index 93e6fa034..c4f5ab8bd 100644 --- a/libc/arch-x86_64/syscalls/umount2.S +++ b/libc/arch-x86_64/syscalls/umount2.S @@ -9,7 +9,7 @@ ENTRY(umount2) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(umount2) diff --git a/libc/arch-x86_64/syscalls/uname.S b/libc/arch-x86_64/syscalls/uname.S index 4b0d1c5e2..d01d1f612 100644 --- a/libc/arch-x86_64/syscalls/uname.S +++ b/libc/arch-x86_64/syscalls/uname.S @@ -9,7 +9,7 @@ ENTRY(uname) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(uname) diff --git a/libc/arch-x86_64/syscalls/unlinkat.S b/libc/arch-x86_64/syscalls/unlinkat.S index f322f7d2e..17726ff03 100644 --- a/libc/arch-x86_64/syscalls/unlinkat.S +++ b/libc/arch-x86_64/syscalls/unlinkat.S @@ -9,7 +9,7 @@ ENTRY(unlinkat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(unlinkat) diff --git a/libc/arch-x86_64/syscalls/unshare.S b/libc/arch-x86_64/syscalls/unshare.S index b5395c141..df94104e6 100644 --- a/libc/arch-x86_64/syscalls/unshare.S +++ b/libc/arch-x86_64/syscalls/unshare.S @@ -9,7 +9,7 @@ ENTRY(unshare) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(unshare) diff --git a/libc/arch-x86_64/syscalls/utimensat.S b/libc/arch-x86_64/syscalls/utimensat.S index f90caf210..c6bf2d4a0 100644 --- a/libc/arch-x86_64/syscalls/utimensat.S +++ b/libc/arch-x86_64/syscalls/utimensat.S @@ -10,7 +10,7 @@ ENTRY(utimensat) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(utimensat) diff --git a/libc/arch-x86_64/syscalls/vmsplice.S b/libc/arch-x86_64/syscalls/vmsplice.S index cc94cc601..66490ab54 100644 --- a/libc/arch-x86_64/syscalls/vmsplice.S +++ b/libc/arch-x86_64/syscalls/vmsplice.S @@ -10,7 +10,7 @@ ENTRY(vmsplice) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(vmsplice) diff --git a/libc/arch-x86_64/syscalls/wait4.S b/libc/arch-x86_64/syscalls/wait4.S index 794833153..b8d78f9a0 100644 --- a/libc/arch-x86_64/syscalls/wait4.S +++ b/libc/arch-x86_64/syscalls/wait4.S @@ -10,7 +10,7 @@ ENTRY(wait4) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(wait4) diff --git a/libc/arch-x86_64/syscalls/write.S b/libc/arch-x86_64/syscalls/write.S index 7e3a56340..20cd68967 100644 --- a/libc/arch-x86_64/syscalls/write.S +++ b/libc/arch-x86_64/syscalls/write.S @@ -9,7 +9,7 @@ ENTRY(write) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(write) diff --git a/libc/arch-x86_64/syscalls/writev.S b/libc/arch-x86_64/syscalls/writev.S index 5fc040a04..2aff0117d 100644 --- a/libc/arch-x86_64/syscalls/writev.S +++ b/libc/arch-x86_64/syscalls/writev.S @@ -9,7 +9,7 @@ ENTRY(writev) jb 1f negl %eax movl %eax, %edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(writev) diff --git a/libc/arch-x86_64/x86_64.mk b/libc/arch-x86_64/x86_64.mk index 234cf6703..7887c519e 100644 --- a/libc/arch-x86_64/x86_64.mk +++ b/libc/arch-x86_64/x86_64.mk @@ -37,6 +37,7 @@ libc_bionic_src_files_x86_64 := \ arch-x86_64/bionic/__set_tls.c \ arch-x86_64/bionic/sigsetjmp.S \ arch-x86_64/bionic/syscall.S \ + arch-x86_64/bionic/vfork.S \ libc_bionic_src_files_x86_64 += \ arch-x86_64/string/sse2-memcpy-slm.S \ diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp index e3e640a53..0c7201986 100644 --- a/libc/bionic/ndk_cruft.cpp +++ b/libc/bionic/ndk_cruft.cpp @@ -225,6 +225,7 @@ extern "C" int tkill(pid_t tid, int sig) { return syscall(__NR_tkill, tid, sig); } +// This was removed from POSIX 2008. extern "C" wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) { return wcsstr(haystack, needle); } @@ -267,7 +268,7 @@ extern "C" int getdtablesize() { return r.rlim_cur; } -// Only used by ftime, which was removed from POSIX. +// Only used by ftime, which was removed from POSIX 2008. struct timeb { time_t time; unsigned short millitm; diff --git a/libc/bionic/pthread_exit.cpp b/libc/bionic/pthread_exit.cpp index a6bb36312..6cd5311ed 100644 --- a/libc/bionic/pthread_exit.cpp +++ b/libc/bionic/pthread_exit.cpp @@ -112,6 +112,12 @@ void pthread_exit(void* return_value) { } pthread_mutex_unlock(&g_thread_list_lock); + // Perform a second key cleanup. When using jemalloc, a call to free from + // _pthread_internal_remove_locked causes the memory associated with a key + // to be reallocated. + // TODO: When b/16847284 is fixed this call can be removed. + pthread_key_clean_all(); + if (user_allocated_stack) { // Cleaning up this thread's stack is the creator's responsibility, not ours. __exit(0); diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 9c6bd3f94..74e573294 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -38,6 +38,14 @@ #ifndef _STDIO_H_ #define _STDIO_H_ +/* + * This file must contain a reference to __gnuc_va_list so that GCC's + * fixincludes knows that that's what's being used for va_list, and so + * to leave our <stdio.h> alone. (fixincludes gets in the way of pointing + * one toolchain at various different sets of platform headers.) + * If you alter this comment, be sure to keep "__gnuc_va_list" in it! + */ + #include <sys/cdefs.h> #include <sys/types.h> diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index 984ceb334..a5eb3d15b 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -111,12 +111,6 @@ void arc4random_buf(void*, size_t); #define RAND_MAX 0x7fffffff -/* Work around x86/x86-64 libvpx build breakage caused by postproc_x86.c. */ -#if (defined(__i386__) || defined(__x86_64__)) && defined(rand) -#undef rand -#define __rand lrand48 -#endif - int rand(void); int rand_r(unsigned int*); void srand(unsigned int); diff --git a/libc/include/string.h b/libc/include/string.h index af1c0c100..8df68e38d 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -94,9 +94,6 @@ extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale #if defined(__BIONIC_FORTIFY) -__errordecl(__memcpy_dest_size_error, "memcpy: prevented write past end of buffer"); -__errordecl(__memcpy_src_size_error, "memcpy: prevented read past end of buffer"); - __BIONIC_FORTIFY_INLINE void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) { char *d = (char *) dest; @@ -104,14 +101,6 @@ void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amou size_t s_len = __bos0(s); size_t d_len = __bos0(d); - if (__builtin_constant_p(copy_amount) && (copy_amount > d_len)) { - __memcpy_dest_size_error(); - } - - if (__builtin_constant_p(copy_amount) && (copy_amount > s_len)) { - __memcpy_src_size_error(); - } - return __builtin___memcpy_chk(dest, src, copy_amount, d_len); } @@ -130,16 +119,12 @@ char* strcpy(char* __restrict dest, const char* __restrict src) { return __builtin___strcpy_chk(dest, src, __bos(dest)); } -__errordecl(__stpncpy_error, "stpncpy: prevented write past end of buffer"); extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t); __BIONIC_FORTIFY_INLINE char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) { size_t bos_dest = __bos(dest); size_t bos_src = __bos(src); - if (__builtin_constant_p(n) && (n > bos_dest)) { - __stpncpy_error(); - } if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin___stpncpy_chk(dest, src, n, bos_dest); @@ -157,16 +142,12 @@ char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) { return __stpncpy_chk2(dest, src, n, bos_dest, bos_src); } -__errordecl(__strncpy_error, "strncpy: prevented write past end of buffer"); extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t); __BIONIC_FORTIFY_INLINE char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) { size_t bos_dest = __bos(dest); size_t bos_src = __bos(src); - if (__builtin_constant_p(n) && (n > bos_dest)) { - __strncpy_error(); - } if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) { return __builtin___strncpy_chk(dest, src, n, bos_dest); @@ -201,7 +182,6 @@ void* memset(void *s, int c, size_t n) { extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t) __asm__(__USER_LABEL_PREFIX__ "strlcpy"); -__errordecl(__strlcpy_error, "strlcpy: prevented write past end of buffer"); extern size_t __strlcpy_chk(char *, const char *, size_t, size_t); __BIONIC_FORTIFY_INLINE @@ -219,12 +199,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) { if (__builtin_constant_p(size) && (size <= bos)) { return __strlcpy_real(dest, src, size); } - - // Compiler can prove, at compile time, that the passed in size - // is always > the actual object size. Force a compiler error. - if (__builtin_constant_p(size) && (size > bos)) { - __strlcpy_error(); - } #endif /* !defined(__clang__) */ return __strlcpy_chk(dest, src, size, bos); @@ -232,7 +206,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) { extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t) __asm__(__USER_LABEL_PREFIX__ "strlcat"); -__errordecl(__strlcat_error, "strlcat: prevented write past end of buffer"); extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t); @@ -251,12 +224,6 @@ size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) { if (__builtin_constant_p(size) && (size <= bos)) { return __strlcat_real(dest, src, size); } - - // Compiler can prove, at compile time, that the passed in size - // is always > the actual object size. Force a compiler error. - if (__builtin_constant_p(size) && (size > bos)) { - __strlcat_error(); - } #endif /* !defined(__clang__) */ return __strlcat_chk(dest, src, size, bos); diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py index 42f2c916b..2b7bec776 100755 --- a/libc/tools/gensyscalls.py +++ b/libc/tools/gensyscalls.py @@ -175,7 +175,7 @@ x86_call = """\ jb 1f negl %%eax pushl %%eax - call __set_errno + call PIC_PLT(__set_errno) addl $4, %%esp 1: """ @@ -197,7 +197,7 @@ x86_64_call = """\ jb 1f negl %%eax movl %%eax, %%edi - call __set_errno + call PIC_PLT(__set_errno) 1: ret END(%(func)s) diff --git a/libc/tools/zoneinfo/ZoneCompactor.java b/libc/tools/zoneinfo/ZoneCompactor.java index f47afd13e..bf3153eff 100644 --- a/libc/tools/zoneinfo/ZoneCompactor.java +++ b/libc/tools/zoneinfo/ZoneCompactor.java @@ -1,9 +1,6 @@ import java.io.*; -import java.nio.ByteOrder; import java.util.*; -import libcore.io.BufferIterator; -import libcore.util.ZoneInfo; // usage: java ZoneCompiler <setup file> <data directory> <output directory> <tzdata version> // @@ -27,66 +24,20 @@ import libcore.util.ZoneInfo; // public class ZoneCompactor { - public static class ByteArrayBufferIteratorBE extends BufferIterator { - private final byte[] bytes; - private int offset = 0; - - public ByteArrayBufferIteratorBE(byte[] bytes) { - this.bytes = bytes; - this.offset = 0; - } - - public void seek(int offset) { - this.offset = offset; - } - - public void skip(int byteCount) { - this.offset += byteCount; - } - - public void readByteArray(byte[] dst, int dstOffset, int byteCount) { - System.arraycopy(bytes, offset, dst, dstOffset, byteCount); - offset += byteCount; - } - - public byte readByte() { - return bytes[offset++]; - } - - public int readInt() { - return ((readByte() & 0xff) << 24) | ((readByte() & 0xff) << 16) | ((readByte() & 0xff) << 8) | (readByte() & 0xff); - } - - public void readIntArray(int[] dst, int dstOffset, int intCount) { - for (int i = 0; i < intCount; ++i) { - dst[dstOffset++] = readInt(); - } - } - - public short readShort() { - throw new UnsupportedOperationException(); - } - } - - // Maximum number of characters in a zone name, including '\0' terminator + // Maximum number of characters in a zone name, including '\0' terminator. private static final int MAXNAME = 40; - // Zone name synonyms + // Zone name synonyms. private Map<String,String> links = new HashMap<String,String>(); - // File starting bytes by zone name - private Map<String,Integer> starts = new HashMap<String,Integer>(); + // File offsets by zone name. + private Map<String,Integer> offsets = new HashMap<String,Integer>(); - // File lengths by zone name + // File lengths by zone name. private Map<String,Integer> lengths = new HashMap<String,Integer>(); - // Raw GMT offsets by zone name - private Map<String,Integer> offsets = new HashMap<String,Integer>(); - private int start = 0; - - // Concatenate the contents of 'inFile' onto 'out' - // and return the contents as a byte array. - private static byte[] copyFile(File inFile, OutputStream out) throws Exception { + // Concatenate the contents of 'inFile' onto 'out'. + private static void copyFile(File inFile, OutputStream out) throws Exception { byte[] ret = new byte[0]; InputStream in = new FileInputStream(inFile); @@ -104,14 +55,14 @@ public class ZoneCompactor { ret = nret; } out.flush(); - return ret; } public ZoneCompactor(String setupFile, String dataDirectory, String zoneTabFile, String outputDirectory, String version) throws Exception { - // Read the setup file, and concatenate all the data. + // Read the setup file and concatenate all the data. ByteArrayOutputStream allData = new ByteArrayOutputStream(); BufferedReader reader = new BufferedReader(new FileReader(setupFile)); String s; + int offset = 0; while ((s = reader.readLine()) != null) { s = s.trim(); if (s.startsWith("Link")) { @@ -125,16 +76,11 @@ public class ZoneCompactor { if (link == null) { File sourceFile = new File(dataDirectory, s); long length = sourceFile.length(); - starts.put(s, start); + offsets.put(s, offset); lengths.put(s, (int) length); - start += length; - byte[] data = copyFile(sourceFile, allData); - - BufferIterator it = new ByteArrayBufferIteratorBE(data); - TimeZone tz = ZoneInfo.makeTimeZone(s, it); - int gmtOffset = tz.getRawOffset(); - offsets.put(s, gmtOffset); + offset += length; + copyFile(sourceFile, allData); } } } @@ -146,9 +92,8 @@ public class ZoneCompactor { String from = it.next(); String to = links.get(from); - starts.put(from, starts.get(to)); - lengths.put(from, lengths.get(to)); offsets.put(from, offsets.get(to)); + lengths.put(from, lengths.get(to)); } // Create/truncate the destination file. @@ -178,7 +123,7 @@ public class ZoneCompactor { // Write the index. ArrayList<String> sortedOlsonIds = new ArrayList<String>(); - sortedOlsonIds.addAll(starts.keySet()); + sortedOlsonIds.addAll(offsets.keySet()); Collections.sort(sortedOlsonIds); it = sortedOlsonIds.iterator(); while (it.hasNext()) { @@ -188,9 +133,9 @@ public class ZoneCompactor { } f.write(toAscii(new byte[MAXNAME], zoneName)); - f.writeInt(starts.get(zoneName)); - f.writeInt(lengths.get(zoneName)); f.writeInt(offsets.get(zoneName)); + f.writeInt(lengths.get(zoneName)); + f.writeInt(0); // Used to be raw GMT offset. No longer used. } int data_offset = (int) f.getFilePointer(); diff --git a/libc/tools/zoneinfo/update-tzdata.py b/libc/tools/zoneinfo/update-tzdata.py index 6b69a5a95..e800e8f8b 100755 --- a/libc/tools/zoneinfo/update-tzdata.py +++ b/libc/tools/zoneinfo/update-tzdata.py @@ -115,7 +115,7 @@ def BuildIcuToolsAndData(data_filename): print 'Configuring ICU tools...' subprocess.check_call(['%s/runConfigureICU' % icu_dir, 'Linux']) print 'Making ICU tools...' - subprocess.check_call(['make', '-j6']) + subprocess.check_call(['make', '-j32']) # Run the ICU tools. os.chdir('tools/tzcode') @@ -169,11 +169,8 @@ def BuildBionicToolsAndData(data_filename): WriteSetupFile() print 'Calling ZoneCompactor to update bionic to %s...' % new_version - libcore_src_dir = '%s/../libcore/luni/src/main/java/' % bionic_dir subprocess.check_call(['javac', '-d', '.', - '%s/ZoneCompactor.java' % bionic_libc_tools_zoneinfo_dir, - '%s/libcore/util/ZoneInfo.java' % libcore_src_dir, - '%s/libcore/io/BufferIterator.java' % libcore_src_dir]) + '%s/ZoneCompactor.java' % bionic_libc_tools_zoneinfo_dir]) subprocess.check_call(['java', 'ZoneCompactor', 'setup', 'data', 'extracted/zone.tab', bionic_libc_zoneinfo_dir, new_version]) diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c index 5e4e962f0..3bbed9086 100644 --- a/libc/tzcode/localtime.c +++ b/libc/tzcode/localtime.c @@ -2210,7 +2210,7 @@ static int __bionic_open_tzdata_path(const char* path_prefix_variable, const cha char buf[NAME_LENGTH]; int32_t start; int32_t length; - int32_t raw_gmt_offset; + int32_t unused; // Was raw GMT offset; always 0 since tzdata2014f (L). }; size_t id_count = (ntohl(header.data_offset) - ntohl(header.index_offset)) / sizeof(struct index_entry_t); diff --git a/libc/zoneinfo/tzdata b/libc/zoneinfo/tzdata Binary files differindex a5ae1f6f5..9547f584c 100644 --- a/libc/zoneinfo/tzdata +++ b/libc/zoneinfo/tzdata diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp index 4da003f3a..5328e48cf 100644 --- a/tests/pthread_test.cpp +++ b/tests/pthread_test.cpp @@ -400,27 +400,36 @@ TEST(pthread, pthread_detach__no_such_thread) { } TEST(pthread, pthread_detach__leak) { - size_t initial_bytes = mallinfo().uordblks; - - pthread_attr_t attr; - ASSERT_EQ(0, pthread_attr_init(&attr)); - ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE)); - - std::vector<pthread_t> threads; - for (size_t i = 0; i < 32; ++i) { - pthread_t t; - ASSERT_EQ(0, pthread_create(&t, &attr, IdFn, NULL)); - threads.push_back(t); - } - - sleep(1); - - for (size_t i = 0; i < 32; ++i) { - ASSERT_EQ(0, pthread_detach(threads[i])) << i; + size_t initial_bytes = 0; + // Run this loop more than once since the first loop causes some memory + // to be allocated permenantly. Run an extra loop to help catch any subtle + // memory leaks. + for (size_t loop = 0; loop < 3; loop++) { + // Set the initial bytes on the second loop since the memory in use + // should have stabilized. + if (loop == 1) { + initial_bytes = mallinfo().uordblks; + } + + pthread_attr_t attr; + ASSERT_EQ(0, pthread_attr_init(&attr)); + ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE)); + + std::vector<pthread_t> threads; + for (size_t i = 0; i < 32; ++i) { + pthread_t t; + ASSERT_EQ(0, pthread_create(&t, &attr, IdFn, NULL)); + threads.push_back(t); + } + + sleep(1); + + for (size_t i = 0; i < 32; ++i) { + ASSERT_EQ(0, pthread_detach(threads[i])) << i; + } } size_t final_bytes = mallinfo().uordblks; - int leaked_bytes = (final_bytes - initial_bytes); // User code (like this test) doesn't know how large pthread_internal_t is. |