aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-08-01 18:03:57 +0000
committerUlrich Drepper <drepper@redhat.com>2008-08-01 18:03:57 +0000
commit42fa1f67d40b121d4e7d12d442e095fb519cc789 (patch)
treee4094f0bf1c10a1d2abfcd23a9904f8a6701c1d2 /sysdeps/unix/sysv
parentcd5743fdec932002473cf170f57d7a83c8f615d1 (diff)
downloadglibc-42fa1f67d40b121d4e7d12d442e095fb519cc789.tar
glibc-42fa1f67d40b121d4e7d12d442e095fb519cc789.tar.gz
glibc-42fa1f67d40b121d4e7d12d442e095fb519cc789.tar.bz2
glibc-42fa1f67d40b121d4e7d12d442e095fb519cc789.zip
* sysdeps/unix/sysv/linux/dl-origin.c (_dl_get_origin): We cannot
use the AT_EXECFN value if it is no absolute path. * sysdeps/unix/sysv/linux/kernel-features.h: Never define __ASSUME_AT_EXECFN.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/dl-origin.c10
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h5
2 files changed, 3 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c
index fdb6372f09..64e865b92a 100644
--- a/sysdeps/unix/sysv/linux/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/dl-origin.c
@@ -35,16 +35,13 @@
const char *
_dl_get_origin (void)
{
-#ifndef __ASSUME_AT_EXECFN
char linkval[PATH_MAX];
-#endif
const char *str;
char *result = (char *) -1l;
int len;
str = GLRO(dl_execfn);
-#ifndef __ASSUME_AT_EXECFN
- if (str == NULL)
+ if (str == NULL || str[0] != '/')
{
INTERNAL_SYSCALL_DECL (err);
@@ -53,12 +50,12 @@ _dl_get_origin (void)
if (! INTERNAL_SYSCALL_ERROR_P (len, err)
&& len > 0 && linkval[0] != '[')
str = linkval;
+ else
+ str = NULL;
}
else
-#endif
len = strlen (str);
-#ifndef __ASSUME_AT_EXECFN
if (str == NULL)
{
/* We use the environment variable LD_ORIGIN_PATH. If it is set make
@@ -79,7 +76,6 @@ _dl_get_origin (void)
}
}
else
-#endif
{
/* We can use this value. */
assert (str[0] == '/');
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index e0d80a5b06..64a7f72230 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -501,11 +501,6 @@
# define __ASSUME_ADJ_OFFSET_SS_READ 1
#endif
-/* Support for AT_EXECFN was added in 2.6.27. */
-#if __LINUX_KERNEL_VERSION >= 0x02061b
-# define __ASSUME_AT_EXECFN 1
-#endif
-
/* Support for various CLOEXEC and NONBLOCK flags was added for x86,
x86-64, PPC, IA-64, and SPARC in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061b \