diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-06 19:16:10 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-06 19:16:10 +0000 |
commit | 909af2f4bebc5ee3531baeec07e91420bcd4d2f4 (patch) | |
tree | b4516ed98cb771f4f4fa2582fe8fc22015a02b12 /lib | |
parent | 0253ed4b5cf63d8de0c6397aa5cf8592f3192e34 (diff) |
Use internal names for __errno, _memcpy, memset, and {,_}{set,long}jmp
Eliminate pointless use of PIC_SYM()
Split out DEFS.h from SYS.h like some other archs
ok kettenis@ deraadt@
Diffstat (limited to 'lib')
24 files changed, 106 insertions, 87 deletions
diff --git a/lib/libc/arch/arm/DEFS.h b/lib/libc/arch/arm/DEFS.h new file mode 100644 index 00000000000..828c9cd68aa --- /dev/null +++ b/lib/libc/arch/arm/DEFS.h @@ -0,0 +1,40 @@ +/* $OpenBSD: DEFS.h,v 1.1 2016/08/06 19:16:09 guenther Exp $ */ +/* + * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include <machine/asm.h> + +/* + * We define a hidden alias with the prefix "_libc_" for each global symbol + * that may be used internally. By referencing _libc_x instead of x, other + * parts of libc prevent overriding by the application and avoid unnecessary + * relocations. + */ +#define _HIDDEN(x) _libc_##x +#define _HIDDEN_ALIAS(x,y) \ + STRONG_ALIAS(_HIDDEN(x),y); \ + .hidden _HIDDEN(x) +#define _HIDDEN_FALIAS(x,y) \ + _HIDDEN_ALIAS(x,y); \ + .type _HIDDEN(x),#function + +/* + * For functions implemented in ASM that aren't syscalls. + * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names + * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names + */ +#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x)) +#define END_WEAK(x) END_STRONG(x); .weak x diff --git a/lib/libc/arch/arm/SYS.h b/lib/libc/arch/arm/SYS.h index baa5f1aefbc..b78ae2d00c4 100644 --- a/lib/libc/arch/arm/SYS.h +++ b/lib/libc/arch/arm/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.15 2016/05/07 19:05:21 guenther Exp $ */ +/* $OpenBSD: SYS.h,v 1.16 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: SYS.h,v 1.8 2003/08/07 16:42:02 agc Exp $ */ /*- @@ -35,33 +35,10 @@ * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 */ -#include <machine/asm.h> +#include "DEFS.h" #include <sys/syscall.h> -/* - * We define a hidden alias with the prefix "_libc_" for each global symbol - * that may be used internally. By referencing _libc_x instead of x, other - * parts of libc prevent overriding by the application and avoid unnecessary - * relocations. - */ -#define _HIDDEN(x) _libc_##x -#define _HIDDEN_ALIAS(x,y) \ - STRONG_ALIAS(_HIDDEN(x),y); \ - .hidden _HIDDEN(x) -#define _HIDDEN_FALIAS(x,y) \ - _HIDDEN_ALIAS(x,y); \ - .type _HIDDEN(x),#function - -/* - * For functions implemented in ASM that aren't syscalls. - * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names - * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names - */ -#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x)) -#define END_WEAK(x) END_STRONG(x); .weak x - - #define SYSENTRY(x) \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x); \ @@ -90,10 +67,10 @@ #define _SYSCALL(x, y) \ _SYSCALL_NOERROR(x,y); \ - bcs PIC_SYM(CERROR, PLT) + bcs CERROR #define _SYSCALL_HIDDEN(x, y) \ _SYSCALL_HIDDEN_NOERROR(x,y); \ - bcs PIC_SYM(CERROR, PLT) + bcs CERROR #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) diff --git a/lib/libc/arch/arm/gen/_setjmp.S b/lib/libc/arch/arm/gen/_setjmp.S index dca5158a01a..270d924ebf3 100644 --- a/lib/libc/arch/arm/gen/_setjmp.S +++ b/lib/libc/arch/arm/gen/_setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: _setjmp.S,v 1.3 2016/05/23 00:18:57 guenther Exp $ */ +/* $OpenBSD: _setjmp.S,v 1.4 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: _setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */ /* @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <machine/asm.h> +#include "DEFS.h" #include <machine/setjmp.h> /* @@ -69,6 +69,7 @@ ENTRY(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP +END_STRONG(_setjmp) ENTRY(_longjmp) ldr r2, .L_setjmp_magic @@ -101,5 +102,6 @@ ENTRY(_longjmp) /* validation failed, die die die. */ botch: - bl PIC_SYM(_libc_abort, PLT) + bl _HIDDEN(abort) b . - 8 /* Cannot get here */ +END_STRONG(_longjmp) diff --git a/lib/libc/arch/arm/gen/divsi3.S b/lib/libc/arch/arm/gen/divsi3.S index 100c88643df..ad14f803a8f 100644 --- a/lib/libc/arch/arm/gen/divsi3.S +++ b/lib/libc/arch/arm/gen/divsi3.S @@ -1,4 +1,4 @@ -/* $OpenBSD: divsi3.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */ +/* $OpenBSD: divsi3.S,v 1.3 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: divsi3.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */ /* @@ -15,7 +15,7 @@ * SUCH DAMAGE. */ -#include <machine/asm.h> +#include "DEFS.h" /* * stack is aligned as there's a possibility of branching to .L_overflow @@ -41,7 +41,7 @@ ENTRY(__modsi3) .L_overflow: #if !defined(_KERNEL) && !defined(_STANDALONE) mov r0, #8 /* SIGFPE */ - bl PIC_SYM(_C_LABEL(raise), PLT) /* raise it */ + bl _HIDDEN(raise) /* raise it */ mov r0, #0 #else /* XXX should cause a fatal error */ diff --git a/lib/libc/arch/arm/gen/setjmp.S b/lib/libc/arch/arm/gen/setjmp.S index 239a49d475c..044b29ef02e 100644 --- a/lib/libc/arch/arm/gen/setjmp.S +++ b/lib/libc/arch/arm/gen/setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: setjmp.S,v 1.4 2016/05/23 00:18:57 guenther Exp $ */ +/* $OpenBSD: setjmp.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */ /* @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <machine/asm.h> +#include "DEFS.h" #include <machine/setjmp.h> /* @@ -51,7 +51,7 @@ ENTRY(setjmp) stmfd sp!, {r0, r14} mov r0, #0x00000000 - bl PIC_SYM(_C_LABEL(_libc_sigblock), PLT) + bl _HIDDEN(sigblock) mov r1, r0 ldmfd sp!, {r0, r14} @@ -78,6 +78,7 @@ ENTRY(setjmp) .Lsetjmp_magic: .word _JB_MAGIC_SETJMP +END_STRONG(setjmp) ENTRY(longjmp) @@ -94,7 +95,7 @@ ENTRY(longjmp) sub sp, sp, #4 /* align the stack */ mov r0, r2 - bl PIC_SYM(_C_LABEL(_libc_sigsetmask), PLT) + bl _HIDDEN(sigsetmask) add sp, sp, #4 /* unalign the stack */ ldmfd sp!, {r0, r1, r14} @@ -130,5 +131,6 @@ ENTRY(longjmp) /* validation failed, die die die. */ botch: - bl PIC_SYM(_libc_abort, PLT) + bl _HIDDEN(abort) b . - 8 /* Cannot get here */ +END_STRONG(longjmp) diff --git a/lib/libc/arch/arm/gen/sigsetjmp.S b/lib/libc/arch/arm/gen/sigsetjmp.S index 50e64297938..52e32c7d248 100644 --- a/lib/libc/arch/arm/gen/sigsetjmp.S +++ b/lib/libc/arch/arm/gen/sigsetjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsetjmp.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */ +/* $OpenBSD: sigsetjmp.S,v 1.3 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: sigsetjmp.S,v 1.3 2002/08/17 19:54:30 thorpej Exp $ */ /* @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <machine/asm.h> +#include "DEFS.h" #include <machine/setjmp.h> /* @@ -48,8 +48,8 @@ ENTRY(sigsetjmp) teq r1, #0 - beq PIC_SYM(_C_LABEL(_setjmp), PLT) - b PIC_SYM(_C_LABEL(setjmp), PLT) + beq _HIDDEN(_setjmp) + b _HIDDEN(setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP @@ -58,5 +58,5 @@ ENTRY(siglongjmp) ldr r2, .L_setjmp_magic ldr r3, [r0] teq r2, r3 - beq PIC_SYM(_C_LABEL(_longjmp), PLT) - b PIC_SYM(_C_LABEL(longjmp), PLT) + beq _HIDDEN(_longjmp) + b _HIDDEN(longjmp) diff --git a/lib/libc/arch/arm/string/_memcpy.S b/lib/libc/arch/arm/string/_memcpy.S index ef2ccc442b9..18c074ea705 100644 --- a/lib/libc/arch/arm/string/_memcpy.S +++ b/lib/libc/arch/arm/string/_memcpy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: _memcpy.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: _memcpy.S,v 1.6 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: _memcpy.S,v 1.4 2003/04/05 23:08:52 bjh21 Exp $ */ /*- @@ -30,7 +30,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" /* * This is one fun bit of code ... @@ -462,4 +462,4 @@ ENTRY(_memcpy) .Lmemcpy_bsrcul1l4: add r1, r1, #1 b .Lmemcpy_bl4 -END(_memcpy) +END_STRONG(_memcpy) diff --git a/lib/libc/arch/arm/string/bcopy.S b/lib/libc/arch/arm/string/bcopy.S index f71b5ce7cbd..c08cb810bd7 100644 --- a/lib/libc/arch/arm/string/bcopy.S +++ b/lib/libc/arch/arm/string/bcopy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bcopy.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: bcopy.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: bcopy.S,v 1.2 2001/07/16 05:50:06 matt Exp $ */ /*- @@ -30,7 +30,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" /* bcopy = memcpy/memmove with arguments reversed. */ @@ -39,5 +39,5 @@ ENTRY(bcopy) eor r0, r1, r0 eor r1, r0, r1 eor r0, r1, r0 - b PIC_SYM(_C_LABEL(_memcpy), PLT) + b _HIDDEN(_memcpy) END_WEAK(bcopy) diff --git a/lib/libc/arch/arm/string/bzero.S b/lib/libc/arch/arm/string/bzero.S index 419e2bbdc9d..4fe7e9b7561 100644 --- a/lib/libc/arch/arm/string/bzero.S +++ b/lib/libc/arch/arm/string/bzero.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bzero.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: bzero.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: bzero.S,v 1.2 2001/07/16 05:50:06 matt Exp $ */ /*- @@ -30,10 +30,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" ENTRY(bzero) mov r2, r1 mov r1, #0 - b PIC_SYM(_C_LABEL(memset), PLT) + b _HIDDEN(memset) END_WEAK(bzero) diff --git a/lib/libc/arch/arm/string/ffs.S b/lib/libc/arch/arm/string/ffs.S index 7f4b289d860..2091b32b6df 100644 --- a/lib/libc/arch/arm/string/ffs.S +++ b/lib/libc/arch/arm/string/ffs.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: ffs.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */ /* * Copyright (c) 2001 Christopher Gilbert @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" /* * ffs - find first set bit, this algorithm isolates the first set diff --git a/lib/libc/arch/arm/string/memcmp.S b/lib/libc/arch/arm/string/memcmp.S index f7c5c966663..cf50451af7d 100644 --- a/lib/libc/arch/arm/string/memcmp.S +++ b/lib/libc/arch/arm/string/memcmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memcmp.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: memcmp.S,v 1.6 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: memcmp.S,v 1.2 2003/04/05 23:08:52 bjh21 Exp $ */ /* @@ -29,7 +29,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" ENTRY(memcmp) /* if (len == 0) return 0 */ diff --git a/lib/libc/arch/arm/string/memcpy.S b/lib/libc/arch/arm/string/memcpy.S index 5797c6d6f33..2b2d46004e6 100644 --- a/lib/libc/arch/arm/string/memcpy.S +++ b/lib/libc/arch/arm/string/memcpy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memcpy.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: memcpy.S,v 1.6 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: memcpy.S,v 1.3 2003/04/05 23:08:52 bjh21 Exp $ */ /*- @@ -30,7 +30,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" /* * XXX @@ -40,6 +40,6 @@ ENTRY(memcpy) stmfd sp!, {r0, lr} - bl PIC_SYM(_C_LABEL(_memcpy), PLT) + bl _HIDDEN(_memcpy) ldmfd sp!, {r0, pc} END_STRONG(memcpy) diff --git a/lib/libc/arch/arm/string/memmove.S b/lib/libc/arch/arm/string/memmove.S index c2f107e3cd8..895c6af5797 100644 --- a/lib/libc/arch/arm/string/memmove.S +++ b/lib/libc/arch/arm/string/memmove.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memmove.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: memmove.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: memmove.S,v 1.3 2003/04/05 23:08:52 bjh21 Exp $ */ /*- @@ -30,10 +30,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" ENTRY(memmove) stmfd sp!, {r0, lr} - bl PIC_SYM(_C_LABEL(_memcpy), PLT) + bl _HIDDEN(_memcpy) ldmfd sp!, {r0, pc} END_STRONG(memmove) diff --git a/lib/libc/arch/arm/string/memset.S b/lib/libc/arch/arm/string/memset.S index 5ab2f9f3bcd..573e924209d 100644 --- a/lib/libc/arch/arm/string/memset.S +++ b/lib/libc/arch/arm/string/memset.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memset.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: memset.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: memset.S,v 1.3 2003/04/05 23:08:52 bjh21 Exp $ */ /* @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" /* * Sets a block of memory to the specified value diff --git a/lib/libc/arch/arm/string/strcmp.S b/lib/libc/arch/arm/string/strcmp.S index 223610d0925..ecc3d2f53d6 100644 --- a/lib/libc/arch/arm/string/strcmp.S +++ b/lib/libc/arch/arm/string/strcmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: strcmp.S,v 1.4 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: strcmp.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: strcmp.S,v 1.3 2003/04/05 23:08:52 bjh21 Exp $ */ /* @@ -29,7 +29,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" ENTRY(strcmp) 1: diff --git a/lib/libc/arch/arm/string/strncmp.S b/lib/libc/arch/arm/string/strncmp.S index 1014d5dc4ea..66ad6b7b43f 100644 --- a/lib/libc/arch/arm/string/strncmp.S +++ b/lib/libc/arch/arm/string/strncmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: strncmp.S,v 1.5 2015/08/31 02:53:56 guenther Exp $ */ +/* $OpenBSD: strncmp.S,v 1.6 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: strncmp.S,v 1.2 2003/04/05 23:08:52 bjh21 Exp $ */ /* @@ -29,7 +29,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include "DEFS.h" ENTRY(strncmp) /* if (len == 0) return 0 */ diff --git a/lib/libc/arch/arm/sys/Ovfork.S b/lib/libc/arch/arm/sys/Ovfork.S index 560949a3237..396a1e82faf 100644 --- a/lib/libc/arch/arm/sys/Ovfork.S +++ b/lib/libc/arch/arm/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: Ovfork.S,v 1.6 2016/05/07 19:05:21 guenther Exp $ */ +/* $OpenBSD: Ovfork.S,v 1.7 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: Ovfork.S,v 1.6 2003/08/07 16:42:03 agc Exp $ */ /*- @@ -40,6 +40,6 @@ SYSENTRY_HIDDEN(vfork) mov r2, r14 SYSTRAP(vfork) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR mov r15, r2 SYSCALL_END_HIDDEN(vfork) diff --git a/lib/libc/arch/arm/sys/brk.S b/lib/libc/arch/arm/sys/brk.S index 691264cf417..f88bc6b97f5 100644 --- a/lib/libc/arch/arm/sys/brk.S +++ b/lib/libc/arch/arm/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.8 2016/05/30 05:18:52 guenther Exp $ */ +/* $OpenBSD: brk.S,v 1.9 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: brk.S,v 1.7 2003/12/26 11:23:44 martin Exp $ */ /*- @@ -71,7 +71,7 @@ ENTRY(brk) movcc r0, r1 mov r2, r0 SYSTRAP(break) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR #ifdef __PIC__ ldr r1, .Lcurbrk diff --git a/lib/libc/arch/arm/sys/cerror.S b/lib/libc/arch/arm/sys/cerror.S index 05ac31af3c0..ec6bce8a1aa 100644 --- a/lib/libc/arch/arm/sys/cerror.S +++ b/lib/libc/arch/arm/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.8 2016/05/07 19:05:21 guenther Exp $ */ +/* $OpenBSD: cerror.S,v 1.9 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $ */ /*- @@ -37,7 +37,7 @@ _ENTRY(CERROR) stmfd sp!, {r4, lr} mov r4, r0 - bl PIC_SYM(_C_LABEL(__errno), PLT) + bl _HIDDEN(__errno) str r4, [r0] mvn r0, #0x00000000 mvn r1, #0x00000000 diff --git a/lib/libc/arch/arm/sys/sbrk.S b/lib/libc/arch/arm/sys/sbrk.S index 4c3e57668df..9a66b791660 100644 --- a/lib/libc/arch/arm/sys/sbrk.S +++ b/lib/libc/arch/arm/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.8 2016/05/30 05:18:52 guenther Exp $ */ +/* $OpenBSD: sbrk.S,v 1.9 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: sbrk.S,v 1.7 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -67,7 +67,7 @@ ENTRY(sbrk) mov r3, r0 add r0, r0, r1 SYSTRAP(break) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR /* Store new curbrk value */ ldr r0, [r2] diff --git a/lib/libc/arch/arm/sys/sigpending.S b/lib/libc/arch/arm/sys/sigpending.S index 7f324fd62e2..72b6042c52e 100644 --- a/lib/libc/arch/arm/sys/sigpending.S +++ b/lib/libc/arch/arm/sys/sigpending.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigpending.S,v 1.4 2015/09/10 13:29:09 guenther Exp $ */ +/* $OpenBSD: sigpending.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: sigpending.S,v 1.5 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -37,7 +37,7 @@ SYSENTRY(sigpending) mov r2, r0 SYSTRAP(sigpending) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR str r0, [r2] mov r0, #0x00000000 mov r15, r14 diff --git a/lib/libc/arch/arm/sys/sigprocmask.S b/lib/libc/arch/arm/sys/sigprocmask.S index b0ca0387990..6bb5948ad50 100644 --- a/lib/libc/arch/arm/sys/sigprocmask.S +++ b/lib/libc/arch/arm/sys/sigprocmask.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigprocmask.S,v 1.4 2015/10/23 04:39:24 guenther Exp $ */ +/* $OpenBSD: sigprocmask.S,v 1.5 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: sigprocmask.S,v 1.5 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -40,7 +40,7 @@ SYSENTRY_HIDDEN(sigprocmask) moveq r1, #0x00000000 ldrne r1, [r1] SYSTRAP(sigprocmask) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR teq r2, #0x00000000 strne r0, [r2] mov r0, #0x00000000 diff --git a/lib/libc/arch/arm/sys/sigsuspend.S b/lib/libc/arch/arm/sys/sigsuspend.S index 3360eab7021..d5dea5397c3 100644 --- a/lib/libc/arch/arm/sys/sigsuspend.S +++ b/lib/libc/arch/arm/sys/sigsuspend.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsuspend.S,v 1.5 2016/05/07 19:05:21 guenther Exp $ */ +/* $OpenBSD: sigsuspend.S,v 1.6 2016/08/06 19:16:09 guenther Exp $ */ /* $NetBSD: sigsuspend.S,v 1.6 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -37,7 +37,7 @@ SYSENTRY_HIDDEN(sigsuspend) ldr r0, [r0] SYSTRAP(sigsuspend) - bcs PIC_SYM(CERROR, PLT) + bcs CERROR mov r0, #0x00000000 mov r15, r14 SYSCALL_END_HIDDEN(sigsuspend) diff --git a/lib/libc/arch/arm/sys/tfork_thread.S b/lib/libc/arch/arm/sys/tfork_thread.S index a24ef6758ef..6b0a624a62d 100644 --- a/lib/libc/arch/arm/sys/tfork_thread.S +++ b/lib/libc/arch/arm/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.3 2015/09/10 13:29:09 guenther Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.4 2016/08/06 19:16:09 guenther Exp $ */ /* * Copyright (c) 2005 Dale Rahn <drahn@openbsd.org> * @@ -25,7 +25,7 @@ ENTRY(__tfork_thread) SYSTRAP(__tfork) - bcs 1f /* XXX can this be PIC_SYM(CERROR, PLT) ? */ + bcs CERROR /* check if we are parent or child */ cmp r0, #0 @@ -37,6 +37,4 @@ ENTRY(__tfork_thread) mov pc, r2 nop SYSTRAP(__threxit) -1: - b PIC_SYM(CERROR, PLT) END(__tfork_thread) |