K 10 svn:author V 3 kib K 8 svn:date V 27 2020-06-13T18:21:31.031265Z K 7 svn:log V 610 Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen. ldd proclaims ET_DYN objects as shared libraries and tries to dlopen(RTLD_TRACE) them to get dependencies. Since PIE binaries are ET_DYN | DF_1_PIE, refusal to dlopen such binaries breaks ldd. Fix it by reading and parsing dynamic segment looking for DF_FLAG_1 and taking DF_1_PIE into account when deciding between binary and library. Reported by: Dewayne Geraghty Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25257 END