OSDN Git Service

avoid malloc of deps array for programs with no external deps
authorRich Felker <dalias@aerifal.cx>
Sun, 3 Mar 2019 17:12:59 +0000 (12:12 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 3 Mar 2019 17:42:16 +0000 (12:42 -0500)
commite612d094b1d27e1d61940e58d8aaeb249c54e768
tree88f894c3d7df19e6ef152fac878d7d0b01b5f0c8
parent2f1f51ae7b2d78247568e7fdb8462f3c19e469a4
avoid malloc of deps array for programs with no external deps

traditionally, we've provided a guarantee that dynamic-linked
applications with no external dependencies (nothing but libc) and no
thread-local storage have no failure paths before the entry point.
normally, thanks to reclaim_gaps, such a malloc will not require a
syscall anyway, but if segment alignment is unlucky, it might. use a
builtin array for this common special case.
ldso/dynlink.c