aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-07-24 18:33:44 +0000
committerUlrich Drepper <drepper@redhat.com>2008-07-24 18:33:44 +0000
commit0e077a7eea286a8efd63460d0ea5d99e44a86b71 (patch)
tree38d71e27469168c43fd230adeb20b206eb156b39 /sysdeps/generic
parent579cdf5a473e1e14e67539103b4cb525f8b7cf6e (diff)
downloadglibc-0e077a7eea286a8efd63460d0ea5d99e44a86b71.tar
glibc-0e077a7eea286a8efd63460d0ea5d99e44a86b71.tar.gz
glibc-0e077a7eea286a8efd63460d0ea5d99e44a86b71.tar.bz2
glibc-0e077a7eea286a8efd63460d0ea5d99e44a86b71.zip
* elf/elf.h: Define AT_EXECFN.
* elf/rtld.c [!__ASSUME_AT_EXECFN] (process_envvars): Don't handle LD_ORIGIN_PATH. * elf/dl-sysdep.c (_dl_sysdep_start): Handle AT_EXECFN. * elf/dl-support.c: Define _dl_execfn. Don't define _dl_origin_path if __ASSUME_AT_EXECFN is defined. (_dl_aux_init): Handle AT_EXECFN. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_AT_EXECFN for 2.6.27 and up. * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_execfn. Don't define _dl_origin_path if __ASSUME_AT_EXECFN is defined. * sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): Use _dl_execfn if available and avoid compatibility code if __ASSUME_AT_EXECFN is defined.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9d1ebdf615..27c8fb620d 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -38,6 +38,7 @@
#include <bits/libc-lock.h>
#include <hp-timing.h>
#include <tls.h>
+#include <kernel-features.h>
__BEGIN_DECLS
@@ -592,8 +593,13 @@ struct rtld_global_ro
/* Names of shared object for which the RPATH should be ignored. */
EXTERN const char *_dl_inhibit_rpath;
+#ifndef __ASSUME_AT_EXECFN
/* Location of the binary. */
EXTERN const char *_dl_origin_path;
+#endif
+
+ /* If set, points to the file name of the executable. */
+ EXTERN const char *_dl_execfn;
/* -1 if the dynamic linker should honor library load bias,
0 if not, -2 use the default (honor biases for normal