Use dl_iterate_phdr() to iterate over the segments and throw the addresses
authorderaadt <deraadt@openbsd.org>
Sun, 13 Jul 2014 13:37:38 +0000 (13:37 +0000)
committerderaadt <deraadt@openbsd.org>
Sun, 13 Jul 2014 13:37:38 +0000 (13:37 +0000)
commit5a30a5b29fa0086d9798beb14607c9b8f4cf9e67
tree446e344b7b53f8fed73a4ef42f3b5ff3a3b9b6fb
parentfdcf90356c6c37afb84ea409db01076787ac79e7
Use dl_iterate_phdr() to iterate over the segments and throw the addresses
into the hash; hoping the system has some ASLR or PIE.  This replaces and
substantially improves upon &main which proved problematic with some picky
linkers.
Work with kettenis, testing by beck
lib/libcrypto/arc4random/getentropy_linux.c
lib/libcrypto/arc4random/getentropy_solaris.c
lib/libcrypto/crypto/getentropy_linux.c
lib/libcrypto/crypto/getentropy_solaris.c