|
Message-ID: <1409469515.4476.270.camel@eris.loria.fr>
Date: Sun, 31 Aug 2014 09:18:35 +0200
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 3/8] use weak symbols for the POSIX functions
that will be used by C threads
Am Samstag, den 30.08.2014, 20:17 -0400 schrieb Rich Felker:
> On Sat, Aug 30, 2014 at 08:46:49PM +0200, Jens Gustedt wrote:
> > diff --git a/src/mman/mprotect.c b/src/mman/mprotect.c
> > index f488486..535787b 100644
> > --- a/src/mman/mprotect.c
> > +++ b/src/mman/mprotect.c
> > @@ -2,10 +2,12 @@
> > #include "libc.h"
> > #include "syscall.h"
> >
> > -int mprotect(void *addr, size_t len, int prot)
> > +int __mprotect(void *addr, size_t len, int prot)
> > {
> > size_t start, end;
> > start = (size_t)addr & -PAGE_SIZE;
> > end = (size_t)((char *)addr + len + PAGE_SIZE-1) & -PAGE_SIZE;
> > return syscall(SYS_mprotect, start, end-start, prot);
> > }
> > +
> > +weak_alias(__mprotect, mprotect);
>
> I'll go ahead and eliminate this one from pthread_create.c like I had
> mentioned so we can omit it. Doing so should be a size reduction too,
> both locally (syscall is generally cheaper than function call) and for
> static linking (since mprotect.o won't get pulled in).
Ok, I'll drop that part then. Please drop me a line when you did,
because I'd have to rebase 7/8 and 8/8 on top of that.
Jens
--
:: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536 ::
:: :::::::::::::::::::::: gsm France : +33 651400183 ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.