From 2f389d46df6a9634589554708e2a7ea6ca901b86 Mon Sep 17 00:00:00 2001 From: Leonid Lisovskiy Date: Tue, 26 Jan 2016 20:12:58 +0300 Subject: ldso: Use single rtld_flags interpretation through all the calls Implement single rtld_flags interpretation through all the do_dlopen()/_dl_load_shared_library()/_dl_load_elf_shared_library() calls chain. This adds the ability to use the flags, passed to dlopen(), in all underlaying functions and implement rtld_flags inheritance. Saves a few bytes code. Signed-off-by: Leonid Lisovskiy Signed-off-by: Waldemar Brodkorb --- ldso/ldso/ldso.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ldso/ldso/ldso.c') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 0cdc91d99..9f4e84130 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -589,7 +589,8 @@ of this helper program; chances are you did not intend to run this program.\n\ * but it could be also a shared object (when ld.so used for tracing) * We keep the misleading app_tpnt name to avoid variable pollution */ - app_tpnt = _dl_load_elf_shared_library(_dl_secure, &rpnt, _dl_progname); + app_tpnt = _dl_load_elf_shared_library(_dl_secure ? __RTLD_SECURE : 0, + &rpnt, _dl_progname); if (!app_tpnt) { _dl_dprintf(2, "can't load '%s'\n", _dl_progname); _dl_exit(16); @@ -887,7 +888,7 @@ of this helper program; chances are you did not intend to run this program.\n\ _dl_if_debug_dprint("\tfile='%s'; needed by '%s'\n", str, _dl_progname); tpnt1 = _dl_load_shared_library( - _dl_secure ? DL_RESOLVE_SECURE : 0, + _dl_secure ? __RTLD_SECURE : 0, &rpnt, NULL, str, trace_loaded_objects); if (!tpnt1) { #ifdef __LDSO_LDD_SUPPORT__ -- cgit v1.2.3