diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2021-10-25 14:38:11 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2021-10-25 14:38:11 +0000 |
commit | 22f69748d8444a35ef07d45773790d5cabdf5489 (patch) | |
tree | 9e637c390d6d80abb7fcd390d15a95d6dd9d678f /lib/libc/arch | |
parent | 617ff59349d42e04409b6eaa154dbfcf3eb34301 (diff) |
Make brk() and sbrk() weak again as intended.
Apparently spotted by mortimer@ while working on clang 13 and amd64.
No actual change on sparc64 as this architecture still uses ld.bfd.
ok kettenis@
Diffstat (limited to 'lib/libc/arch')
-rw-r--r-- | lib/libc/arch/arm/sys/brk.S | 5 | ||||
-rw-r--r-- | lib/libc/arch/arm/sys/sbrk.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/i386/sys/brk.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/i386/sys/sbrk.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/sys/brk.S | 5 | ||||
-rw-r--r-- | lib/libc/arch/powerpc/sys/sbrk.S | 5 | ||||
-rw-r--r-- | lib/libc/arch/riscv64/sys/brk.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/riscv64/sys/sbrk.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/sparc64/sys/brk.S | 5 | ||||
-rw-r--r-- | lib/libc/arch/sparc64/sys/sbrk.S | 5 |
10 files changed, 20 insertions, 25 deletions
diff --git a/lib/libc/arch/arm/sys/brk.S b/lib/libc/arch/arm/sys/brk.S index c2f2650d9e2..a33c2995142 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.10 2017/11/21 19:08:36 kettenis Exp $ */ +/* $OpenBSD: brk.S,v 1.11 2021/10/25 14:38:10 jca Exp $ */ /* $NetBSD: brk.S,v 1.7 2003/12/26 11:23:44 martin Exp $ */ /*- @@ -44,8 +44,6 @@ __minbrk: .word _C_LABEL(_end) END(__minbrk) - .weak brk - /* * Change the data segment size */ @@ -96,3 +94,4 @@ ENTRY(brk) .Lcurbrk: .word PIC_SYM(__curbrk, GOT) END(brk) + .weak brk diff --git a/lib/libc/arch/arm/sys/sbrk.S b/lib/libc/arch/arm/sys/sbrk.S index eba1f4c44c4..107091bf621 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.10 2017/11/21 19:08:36 kettenis Exp $ */ +/* $OpenBSD: sbrk.S,v 1.11 2021/10/25 14:38:10 jca Exp $ */ /* $NetBSD: sbrk.S,v 1.7 2003/08/07 16:42:05 agc Exp $ */ /*- @@ -45,7 +45,6 @@ __curbrk: .word _C_LABEL(_end) END(__curbrk) - .weak sbrk /* * Change the data segment size */ @@ -85,3 +84,4 @@ ENTRY(sbrk) .Lcurbrk: .word PIC_SYM(__curbrk, GOT) END(sbrk) + .weak sbrk diff --git a/lib/libc/arch/i386/sys/brk.S b/lib/libc/arch/i386/sys/brk.S index 82cb591b661..6d4fac33828 100644 --- a/lib/libc/arch/i386/sys/brk.S +++ b/lib/libc/arch/i386/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.13 2017/08/19 18:24:06 deraadt Exp $ */ +/* $OpenBSD: brk.S,v 1.14 2021/10/25 14:38:10 jca Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -42,7 +42,6 @@ __minbrk: END(__minbrk) .type __minbrk,@object - .weak brk ENTRY(brk) #ifdef __PIC__ movl 4(%esp),%ecx @@ -82,3 +81,4 @@ ENTRY(brk) SET_ERRNO() ret END(brk) + .weak brk diff --git a/lib/libc/arch/i386/sys/sbrk.S b/lib/libc/arch/i386/sys/sbrk.S index a89dd1f3682..e54e5e202dc 100644 --- a/lib/libc/arch/i386/sys/sbrk.S +++ b/lib/libc/arch/i386/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.13 2017/08/19 18:24:06 deraadt Exp $ */ +/* $OpenBSD: sbrk.S,v 1.14 2021/10/25 14:38:10 jca Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -42,7 +42,6 @@ __curbrk: .long _end END(__curbrk) .type __curbrk,@object - .weak sbrk ENTRY(sbrk) #ifdef __PIC__ movl 4(%esp),%ecx @@ -76,3 +75,4 @@ ENTRY(sbrk) SET_ERRNO() ret END(sbrk) + .weak sbrk diff --git a/lib/libc/arch/powerpc/sys/brk.S b/lib/libc/arch/powerpc/sys/brk.S index d8247bd7d94..51b1a14de7b 100644 --- a/lib/libc/arch/powerpc/sys/brk.S +++ b/lib/libc/arch/powerpc/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.15 2020/10/26 22:07:05 gkoehler Exp $ */ +/* $OpenBSD: brk.S,v 1.16 2021/10/25 14:38:10 jca Exp $ */ /* * Copyright (c) 1996 Dale Rahn @@ -30,8 +30,6 @@ .extern __curbrk .extern _C_LABEL(_end) - .weak brk - ENTRY(brk) /* check >= _end, if not make the call for _end */ @@ -77,3 +75,4 @@ ENTRY(brk) mr 3, 0 /* # return 0 */ blr END(brk) + .weak brk diff --git a/lib/libc/arch/powerpc/sys/sbrk.S b/lib/libc/arch/powerpc/sys/sbrk.S index c676a65c5f5..5976629a522 100644 --- a/lib/libc/arch/powerpc/sys/sbrk.S +++ b/lib/libc/arch/powerpc/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.14 2020/10/26 22:07:05 gkoehler Exp $ */ +/* $OpenBSD: sbrk.S,v 1.15 2021/10/25 14:38:10 jca Exp $ */ /* * Copyright (c) 1996 Dale Rahn @@ -36,8 +36,6 @@ __curbrk: END(__curbrk) .type __curbrk,@object - .weak sbrk - .text ENTRY(sbrk) @@ -74,3 +72,4 @@ ENTRY(sbrk) mr 3, 5 /* # remember, 5=old_curbrk */ blr END(sbrk) + .weak sbrk diff --git a/lib/libc/arch/riscv64/sys/brk.S b/lib/libc/arch/riscv64/sys/brk.S index 74a1c2a68bf..d84e1b5bcd6 100644 --- a/lib/libc/arch/riscv64/sys/brk.S +++ b/lib/libc/arch/riscv64/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.1 2021/05/04 04:17:53 drahn Exp $ */ +/* $OpenBSD: brk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */ /* * Copyright (c) 2021 Dale Rahn <drahn@openbsd.org> * @@ -26,7 +26,6 @@ __minbrk: .dword _C_LABEL(_end) - .weak brk ENTRY(brk) RETGUARD_SETUP(brk, t6) lla t1, _C_LABEL(__minbrk) @@ -56,3 +55,4 @@ ENTRY(brk) RETGUARD_CHECK(brk, t6); ret END(brk) + .weak brk diff --git a/lib/libc/arch/riscv64/sys/sbrk.S b/lib/libc/arch/riscv64/sys/sbrk.S index 02d02d3900d..a58effc3232 100644 --- a/lib/libc/arch/riscv64/sys/sbrk.S +++ b/lib/libc/arch/riscv64/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.1 2021/05/04 04:17:53 drahn Exp $ */ +/* $OpenBSD: sbrk.S,v 1.2 2021/10/25 14:38:10 jca Exp $ */ /* * Copyright (c) 2021 Dale Rahn <drahn@openbsd.org> * @@ -28,7 +28,6 @@ __curbrk: .dword _C_LABEL(_end) END(__curbrk) - .weak sbrk ENTRY(sbrk) RETGUARD_SETUP(sbrk, t6) @@ -48,3 +47,4 @@ ENTRY(sbrk) RETGUARD_CHECK(sbrk, t6); ret END(sbrk) + .weak sbrk diff --git a/lib/libc/arch/sparc64/sys/brk.S b/lib/libc/arch/sparc64/sys/brk.S index f6c6d5223ca..03bcebd9fa1 100644 --- a/lib/libc/arch/sparc64/sys/brk.S +++ b/lib/libc/arch/sparc64/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.7 2015/09/05 06:22:47 guenther Exp $ */ +/* $OpenBSD: brk.S,v 1.8 2021/10/25 14:38:10 jca Exp $ */ /* $NetBSD: brk.S,v 1.9 2000/07/25 20:15:40 mycroft Exp $ */ /* @@ -41,8 +41,6 @@ .globl __curbrk .globl _C_LABEL(_end) - .weak brk - .data .align 8 __minbrk: @@ -85,3 +83,4 @@ ENTRY(brk) stx %o2, [%g1 + %lo(__curbrk)] #endif END(brk) + .weak brk diff --git a/lib/libc/arch/sparc64/sys/sbrk.S b/lib/libc/arch/sparc64/sys/sbrk.S index 98bb8819f0d..a1663f43466 100644 --- a/lib/libc/arch/sparc64/sys/sbrk.S +++ b/lib/libc/arch/sparc64/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.5 2015/09/05 06:22:47 guenther Exp $ */ +/* $OpenBSD: sbrk.S,v 1.6 2021/10/25 14:38:10 jca Exp $ */ /* $NetBSD: sbrk.S,v 1.7 2000/07/25 15:14:46 mycroft Exp $ */ /* @@ -50,8 +50,6 @@ __curbrk: OTYPE(__curbrk) .text - .weak sbrk - ENTRY(sbrk) #ifdef __PIC__ PIC_PROLOGUE(%o5,%o4) @@ -83,3 +81,4 @@ ENTRY(sbrk) stx %o4, [%o2 + %lo(__curbrk)] #endif END(sbrk) + .weak sbrk |