CVSROOT: /cvs Module name: src Changes by: dera...@cvs.openbsd.org 2024/01/22 09:18:06
Modified files: lib/libc/yp : yp_bind.c lib/libc/rpc : Makefile.inc clnt_udp.c Added files: lib/libc/rpc : clnt_udp.h clnt_udp_bufcreate.c Log message: When getpwnam(3) reaches out to YP, it calls clntudp_create(3) with a pre-initialized ypconnect(2) socket. That calls clntudp_bufcreate(), which contains code checking if the socket and address are configured.. If not, socket(2) is called, or an address allocation is performed via the portmapper (which calls a whole lot more code). Split clnt_udp.c into two .c files (which will compile as seperate .o files), and create a new libc-private clntudp_bufcreate_simple() function which skips the socket and address work. Result: In most static binaries, this reduces the text segment by ~100K, and removes 5-7 system call stubs -- which might matter for non-pledged binaries with otherwise lack socket(2). ok millert jmatthew