From c99cc49e0bababd9de89bccb11328033f9189fa6 Mon Sep 17 00:00:00 2001 From: visa Date: Sat, 27 Nov 2021 15:12:19 +0000 Subject: [PATCH] Make brk() and sbrk() weak again to fix build with clang 13. OK jsg@ --- lib/libc/arch/mips64/sys/brk.S | 5 ++--- lib/libc/arch/mips64/sys/sbrk.S | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/libc/arch/mips64/sys/brk.S b/lib/libc/arch/mips64/sys/brk.S index 1b2becceb72..ada3b7304e6 100644 --- a/lib/libc/arch/mips64/sys/brk.S +++ b/lib/libc/arch/mips64/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 2021/11/27 15:12:19 visa Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -45,8 +45,6 @@ __minbrk: FRAMESZ= MKFSIZ(1,1) GPOFF= FRAMESZ-2*REGSZ - .weak brk - LEAF(brk, FRAMESZ) PTR_SUBU sp, FRAMESZ SETUP_GP64(GPOFF, brk) @@ -70,3 +68,4 @@ LEAF(brk, FRAMESZ) PTR_ADDU sp, FRAMESZ jr t9 END(brk) + .weak brk diff --git a/lib/libc/arch/mips64/sys/sbrk.S b/lib/libc/arch/mips64/sys/sbrk.S index bff3afbabe9..87b9563a72f 100644 --- a/lib/libc/arch/mips64/sys/sbrk.S +++ b/lib/libc/arch/mips64/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 2021/11/27 15:12:19 visa Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -45,8 +45,6 @@ __curbrk: PTR_VAL _C_LABEL(_end) FRAMESZ= MKFSIZ(1,1) GPOFF= FRAMESZ-2*REGSZ - .weak sbrk - LEAF(sbrk, FRAMESZ) PTR_SUBU sp, FRAMESZ SETUP_GP64(GPOFF, sbrk) @@ -68,3 +66,4 @@ LEAF(sbrk, FRAMESZ) PTR_ADDU sp, FRAMESZ jr t9 END(sbrk) + .weak sbrk -- 2.20.1