From b3436addb5ccf14d7fffcf5503644e9a62aaec4e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 2 Jan 2012 02:24:49 -0500 Subject: ldso: simplify interp path search logic The setup logic is duplicated, so unify it in a local func. Mark the variable const while we're doing this, and add missing ifdef protection to the header that declares it availability. Signed-off-by: Mike Frysinger --- ldso/include/ldso.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ldso/include') diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 4c091779d..6f3b728c3 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -73,7 +73,9 @@ struct init_fini_list { /* Global variables used within the shared library loader */ extern char *_dl_library_path; /* Where we look for libraries */ extern char *_dl_preload; /* Things to be loaded before the libs */ -extern char *_dl_ldsopath; /* Where the shared lib loader was found */ +#ifdef __LDSO_SEARCH_INTERP_PATH__ +extern const char *_dl_ldsopath; /* Where the shared lib loader was found */ +#endif extern const char *_dl_progname; /* The name of the executable being run */ extern size_t _dl_pagesize; /* Store the page size for use later */ #ifdef __LDSO_PRELINK_SUPPORT__ -- cgit v1.2.3