]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A simple script to help me ensure that my libpthread.so looks
authorJulian Seward <jseward@acm.org>
Fri, 26 Apr 2002 11:50:43 +0000 (11:50 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 26 Apr 2002 11:50:43 +0000 (11:50 +0000)
from the outside, to the linker, identical to the original.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@152

coregrind/dosyms [new file with mode: 0755]
dosyms [new file with mode: 0755]

diff --git a/coregrind/dosyms b/coregrind/dosyms
new file mode 100755 (executable)
index 0000000..4a46f01
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# A simple script to help me ensure that my libpthread.so looks
+# from the outside, to the linker, identical to the original.
+
+nm /lib/libpthread.so.0 | grep " T " | cut -c 10- > orig-T
+nm /lib/libpthread.so.0 | grep " D " | cut -c 10- > orig-D
+nm /lib/libpthread.so.0 | grep " W " | cut -c 10- > orig-W
+
+nm ./libpthread.so | grep " T " | cut -c 10- > mine-T
+nm ./libpthread.so | grep " D " | cut -c 10- > mine-D
+nm ./libpthread.so | grep " W " | cut -c 10- > mine-W
+
+echo ========================== TEXT orig vs mine =========================
+sdiff -w 80 orig-T mine-T
+echo
+
+echo ========================== WEAK orig vs mine =========================
+sdiff -w 80 orig-W mine-W
+echo
+
+echo ========================== DATA orig vs mine =========================
+sdiff -w 80 orig-D mine-D
+echo
diff --git a/dosyms b/dosyms
new file mode 100755 (executable)
index 0000000..4a46f01
--- /dev/null
+++ b/dosyms
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# A simple script to help me ensure that my libpthread.so looks
+# from the outside, to the linker, identical to the original.
+
+nm /lib/libpthread.so.0 | grep " T " | cut -c 10- > orig-T
+nm /lib/libpthread.so.0 | grep " D " | cut -c 10- > orig-D
+nm /lib/libpthread.so.0 | grep " W " | cut -c 10- > orig-W
+
+nm ./libpthread.so | grep " T " | cut -c 10- > mine-T
+nm ./libpthread.so | grep " D " | cut -c 10- > mine-D
+nm ./libpthread.so | grep " W " | cut -c 10- > mine-W
+
+echo ========================== TEXT orig vs mine =========================
+sdiff -w 80 orig-T mine-T
+echo
+
+echo ========================== WEAK orig vs mine =========================
+sdiff -w 80 orig-W mine-W
+echo
+
+echo ========================== DATA orig vs mine =========================
+sdiff -w 80 orig-D mine-D
+echo