freebsd-skq/libexec
Edward Tomasz Napierala b4ed9a87f9 Remove unneeded calls to access(2) from rtld(1); just call open(2) instead.
The result looks like this:

--- przed       2017-10-21 23:19:21.445034000 +0100
+++ po  2017-10-21 23:18:50.031865000 +0100
@@ -11,7 +11,6 @@ mmap(0x0,102,PROT_READ,MAP_PRIVATE,3,0x0)      = 343665418
 close(3)                                        = 0 (0x0)
 open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0165) ERR#2 'No such file or directory'
 munmap(0x80067d000,102)                                 = 0 (0x0)
-access("/usr/local/lib/libintl.so.8",F_OK)      = 0 (0x0)
 openat(AT_FDCWD,"/usr/local/lib/libintl.so.8",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3)
 fstat(3,{ mode=-rw-r--r-- ,inode=642560,size=55188,blksize=32768 }) = 0 (0x0)
 mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366541824 (0x80067d000)
@@ -20,14 +19,13 @@ mmap(0x800877000,40960,PROT_READ|PROT_EXEC,MAP_PRIVATE
 mmap(0x800a81000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0xa000) = 34370752512 (0x800a81000)
 munmap(0x80067d000,4096)                        = 0 (0x0)
 close(3)                                        = 0 (0x0)
-access("/usr/local/lib/libc.so.7",F_OK)                 ERR#2 'No such file or directory'
+openat(AT_FDCWD,"/usr/local/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) ERR#2 'No such file or directory'
 openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-2\0\0"...,128) = 128 (0x80)
 fstat(3,{ mode=-r--r--r-- ,inode=970684,size=306,blksize=32768 }) = 0 (0x0)
 lseek(3,0x80,SEEK_SET)                          = 128 (0x80)
 read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,178) = 178 (0xb2)
 close(3)                                        = 0 (0x0)
-access("/lib/libc.so.7",F_OK)                   = 0 (0x0)
 openat(AT_FDCWD,"/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3)
 fstat(3,{ mode=-r--r--r-- ,inode=1605239,size=1910320,blksize=32768 }) = 0 (0x0)
 mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366541824 (0x80067d000)

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12766
2017-10-24 12:56:08 +00:00
..
atf Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
atrun libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
blacklistd-helper DIRDEPS_BUILD: Connect new directories and update dependencies. 2016-06-03 19:25:30 +00:00
bootpd Emply contemporary function prototypes in bootpd, rather than relying on 2017-03-26 14:37:12 +00:00
comsat Add META_MODE support. 2015-06-13 19:20:56 +00:00
dma DIRDEPS_BUILD: Update dependencies. 2017-05-09 01:48:23 +00:00
fingerd DIRDEPS_BUILD: Update dependencies 2016-06-14 16:55:05 +00:00
ftpd ftpd(8): fix user context handling. 2017-10-06 13:46:05 +00:00
getty Add a new getty/gettytab capability to generate an initial message dynamically. 2017-09-07 00:20:17 +00:00
hyperv hyperv: Add VF bringup scripts and devd rules. 2017-07-31 07:18:15 +00:00
mail.local libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
makewhatis.local Deorbit catman. The tradeoff of disk for performance has long since tipped 2017-09-13 16:35:16 +00:00
mknetid Add META_MODE support. 2015-06-13 19:20:56 +00:00
pppoed Add META_MODE support. 2015-06-13 19:20:56 +00:00
rbootd rbootd: use NULL instead of zero for pointers. 2016-04-18 15:05:48 +00:00
revnetgroup Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rquotad Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rstatd - Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter 2017-04-17 17:34:47 +00:00
rpc.rusersd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.rwalld Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.sprayd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rtld-aout
rtld-elf Remove unneeded calls to access(2) from rtld(1); just call open(2) instead. 2017-10-24 12:56:08 +00:00
save-entropy Add META_MODE support. 2015-06-13 19:20:56 +00:00
smrsh libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
talkd libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
tcpd libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
telnetd libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
tests Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
tftp-proxy libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
tftpd Conditionalize all code that uses tcpd.h behind LIBWRAP guard 2017-01-06 04:27:07 +00:00
ulog-helper Add META_MODE support. 2015-06-13 19:20:56 +00:00
ypxfr libexec: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:28:03 +00:00
Makefile Remove rcmds. 2017-10-06 08:43:14 +00:00
Makefile.amd64 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.i386 HYPERV isn't available on all architectures, but just on by default 2014-10-16 00:33:06 +00:00
Makefile.inc