aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-14 15:21:35 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-14 15:21:35 +0000
commit3a8599b21c3127b3d99915b7be58975606f89775 (patch)
treedd0ecb9ed5ec00268ea89e2849d7848d3d07fba4
parentc33bd0123ed605d201ee43dcd80998b6ab858022 (diff)
downloadglibc-3a8599b21c3127b3d99915b7be58975606f89775.zip
glibc-3a8599b21c3127b3d99915b7be58975606f89775.tar.gz
glibc-3a8599b21c3127b3d99915b7be58975606f89775.tar.bz2
Update.
1999-07-13 Jakub Jelinek <jj@ultra.linux.cz> * elf/ldd.bash.in: Add support for multiple dynamic linkers. * sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed: On sparc*linux*, try both 32bit and 64bit dynamic linker. * sysdeps/unix/sysv/linux/configure.in: Apply sparc ldd-rewrite script on all sparc targets. 1999-07-13 Jakub Jelinek <jj@ultra.linux.cz> * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer to int.
-rw-r--r--ChangeLog13
-rw-r--r--elf/ldd.bash.in23
-rw-r--r--sysdeps/unix/sysv/linux/configure2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/shmat.c8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed1
6 files changed, 39 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 064d5ed..cd51ee9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+1999-07-13 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * elf/ldd.bash.in: Add support for multiple dynamic linkers.
+ * sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed: On sparc*linux*,
+ try both 32bit and 64bit dynamic linker.
+ * sysdeps/unix/sysv/linux/configure.in: Apply sparc ldd-rewrite
+ script on all sparc targets.
+
+1999-07-13 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sysdeps/unix/sysv/linux/shmat.c (shmat): Avoid casting a pointer
+ to int.
+
1999-07-13 Andreas Schwab <schwab@suse.de>
* elf/dl-runtime.c (fixup, profile_fixup): Call alloca to prevent
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 5eeba80..85e0f88 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -28,7 +28,7 @@
TEXTDOMAIN=libc
TEXTDOMAINDIR=@TEXTDOMAINDIR@
-RTLD=@RTLD@
+RTLDLIST=@RTLD@
warn=
bind_now=
verbose=
@@ -125,8 +125,23 @@ for file do
elif test -r "$file"; then
test -x "$file" || echo 'ldd:' $"\
warning: you do not have execution permission for" "\`$file'" >&2
- verify_out=`${RTLD} --verify "$file"`
- case $? in
+ RTLD=
+ for rtld in ${RTLDLIST}; do
+ if test -x $rtld; then
+ verify_out=`${rtld} --verify "$file"`
+ ret=$?
+ case $ret in
+ [02]) RTLD=${rtld}; break;;
+ esac
+ fi
+ done
+ if test -z "${RTLD}"; then
+ set ${RTLDLIST}
+ RTLD=$1
+ verify_out=`${RTLD} --verify "$file"`
+ ret=$?
+ fi
+ case $ret in
0)
eval $add_env '"$file"' || result=1
;;
@@ -141,7 +156,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
eval $add_env \${RTLD} '"$file"' || result=1
;;
*)
- echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($?)" >&2
+ echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
exit 1
;;
esac
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 2e3ba90..87a5bff 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -155,7 +155,7 @@ case "$machine" in
i[3456]86* | m68*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
;;
- sparc/sparc32)
+ sparc*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
;;
*)
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index d7b2bd9..fae7934 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -126,7 +126,7 @@ case "$machine" in
i[3456]86* | m68*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
;;
- sparc/sparc32)
+ sparc*)
ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
;;
*)
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c
index 9ebac49..6e25d45 100644
--- a/sysdeps/unix/sysv/linux/shmat.c
+++ b/sysdeps/unix/sysv/linux/shmat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -33,11 +33,11 @@ shmat (shmid, shmaddr, shmflg)
const void *shmaddr;
int shmflg;
{
- int retval;
+ long int retval;
unsigned long raddr;
- retval = INLINE_SYSCALL (ipc, 5, IPCOP_shmat, shmid, shmflg, (int) &raddr,
- (void *) shmaddr);
+ retval = INLINE_SYSCALL (ipc, 5, IPCOP_shmat, shmid, shmflg,
+ (long int) &raddr, (void *) shmaddr);
return ((unsigned long int) retval > -(unsigned long int) SHMLBA
? (void *) retval : (void *) raddr);
}
diff --git a/sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
index f0a192c..7dc2698 100644
--- a/sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
+++ b/sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
@@ -1,2 +1,3 @@
/LD_TRACE_LOADED_OBJECTS=1/a\
add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\)\(/[^/]*\.so\.[0-9.]*\)[ ]*$_\1"\2\4 \264\4"_