From 05d27237debea4c7dd54f002db12755a3ca47d24 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sun, 27 Oct 2019 21:07:14 +0000 Subject: Mark the _Qp_{mul,div,add,sub} functions as 'protected' to eliminate PLT entries and prevent overriding ok kettenis@ deraadt@ --- lib/libc/arch/sparc64/fpu/fpu_qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/arch/sparc64/fpu/fpu_qp.c b/lib/libc/arch/sparc64/fpu/fpu_qp.c index c0821b2b487..c2cfbdec9f2 100644 --- a/lib/libc/arch/sparc64/fpu/fpu_qp.c +++ b/lib/libc/arch/sparc64/fpu/fpu_qp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_qp.c,v 1.8 2019/06/21 17:00:58 jca Exp $ */ +/* $OpenBSD: fpu_qp.c,v 1.9 2019/10/27 21:07:13 guenther Exp $ */ /*- * Copyright (c) 2002 Jake Burkholder. @@ -50,7 +50,8 @@ _Qp_ ## op(u_int *c, u_int *a, u_int *b) \ r = __fpu_ ## op(&fe); \ c[0] = __fpu_ftoq(&fe, r, c); \ } \ -DEF_STRONG(_Qp_ ## op); +DEF_STRONG(_Qp_ ## op); \ +asm(".protected _Qp_"#op); #define _QP_TTOQ(qname, fname, ntype, signpos, atype, ...) \ void _Qp_ ## qname ## toq(u_int *c, ntype n); \ -- cgit v1.2.3