mirror of
https://abf.rosa.ru/djam/glibc40.git
synced 2025-02-23 07:42:54 +00:00
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
2005-08-29 Gwenole Beauchesne <gbeauchesne@mandriva.com>
|
|
|
|
* debug/xtrace.sh: Make it biarch capable on 64-bit Linux platforms.
|
|
* malloc/memusage.sh: Likewise.
|
|
|
|
--- glibc-2.3.5/debug/xtrace.sh.biarch-utils 2005-08-29 12:48:24.000000000 -0400
|
|
+++ glibc-2.3.5/debug/xtrace.sh 2005-08-29 16:58:02.000000000 -0400
|
|
@@ -151,6 +151,23 @@ if test ! -x "$program"; then
|
|
help_info
|
|
fi
|
|
|
|
+# Biarch transmutation.
|
|
+host_os=`uname -o`
|
|
+host_cpu=`uname -m`
|
|
+case $host_os in
|
|
+*Linux*)
|
|
+ # test if the binary is 32-bit
|
|
+ elf32=no
|
|
+ if file -L `which $program` | grep -q "ELF 32"; then
|
|
+ elf32=yes
|
|
+ fi
|
|
+esac
|
|
+case $host_cpu:$elf32 in
|
|
+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
|
|
+ pcprofileso=`echo $pcprofileso | sed -e "s,/lib64/,/lib/,"`
|
|
+ ;;
|
|
+esac
|
|
+
|
|
# We have two modes. If a data file is given simply print the included data.
|
|
printf "%-20s %-*s %6s\n" Function $(expr $COLUMNS - 30) File Line
|
|
for i in $(seq 1 $COLUMNS); do printf -; done; printf '\n'
|
|
--- glibc-2.3.5/malloc/memusage.sh.biarch-utils 2005-03-07 18:44:10.000000000 -0500
|
|
+++ glibc-2.3.5/malloc/memusage.sh 2005-08-29 16:25:12.000000000 -0400
|
|
@@ -205,6 +205,23 @@ if test $# -eq 0; then
|
|
do_usage
|
|
fi
|
|
|
|
+# Biarch transmutation.
|
|
+host_os=`uname -o`
|
|
+host_cpu=`uname -m`
|
|
+case $host_os in
|
|
+*Linux*)
|
|
+ # test if the binary is 32-bit
|
|
+ elf32=no
|
|
+ if file -L `which $1` | grep -q "ELF 32"; then
|
|
+ elf32=yes
|
|
+ fi
|
|
+esac
|
|
+case $host_cpu:$elf32 in
|
|
+powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
|
|
+ memusageso=`echo $memusageso | sed -e "s,/lib64/,/lib/,"`
|
|
+ ;;
|
|
+esac
|
|
+
|
|
# This will be in the environment.
|
|
add_env="LD_PRELOAD=$memusageso"
|
|
|