svn commit: r362526 - stable/12/libexec/rtld-elf
Konstantin Belousov
kib at FreeBSD.org
Tue Jun 23 03:18:57 UTC 2020
Author: kib
Date: Tue Jun 23 03:18:57 2020
New Revision: 362526
URL: https://svnweb.freebsd.org/changeset/base/362526
Log:
MFC r362251:
rtld: Allow to load ET_DYN && DF_1_PIE when tracing.
Modified:
stable/12/libexec/rtld-elf/rtld.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:07 2020 (r362525)
+++ stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:57 2020 (r362526)
@@ -2565,12 +2565,13 @@ do_load_object(int fd, const char *name, char *path, s
obj->path = path;
if (!digest_dynamic(obj, 0))
goto errp;
- if (obj->z_pie) {
+ dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path,
+ obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount);
+ if (obj->z_pie && (flags & RTLD_LO_TRACE) == 0) {
+ dbg("refusing to load PIE executable \"%s\"", obj->path);
_rtld_error("Cannot load PIE binary %s as DSO", obj->path);
goto errp;
}
- dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path,
- obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount);
if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) ==
RTLD_LO_DLOPEN) {
dbg("refusing to load non-loadable \"%s\"", obj->path);
More information about the svn-src-stable
mailing list