rpms/abicheck/devel abicheck-1.2-ldlinux.patch, NONE, 1.1 abicheck.spec, 1.21, 1.22

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Tue Aug 16 20:51:33 UTC 2005


Author: mschwendt

Update of /cvs/extras/rpms/abicheck/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1254

Modified Files:
	abicheck.spec 
Added Files:
	abicheck-1.2-ldlinux.patch 
Log Message:
* Tue Aug 16 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2-9
- Patch abicheck to run dynamic linker directly instead of
  using ldd and receiving its intermixed lines.


abicheck-1.2-ldlinux.patch:

--- NEW FILE abicheck-1.2-ldlinux.patch ---
diff -Nur abicheck-1.2-orig/abicheck.pl abicheck-1.2/abicheck.pl
--- abicheck-1.2-orig/abicheck.pl	2003-08-26 21:57:51.000000000 +0200
+++ abicheck-1.2/abicheck.pl	2005-08-16 22:49:06.000000000 +0200
@@ -496,7 +496,7 @@
 
 	if ( ! $pid ) {
 		# child here, go run ldd -r with debug env:
-		exec_ldd($file);
+		exec_ldd($file,$file0);
 		exit 1;
 	}
 	
@@ -1241,7 +1241,7 @@
 # will read command output.
 #
 sub exec_ldd {
-	my ($file) = @_;
+	my ($file,$file0) = @_;
 
 	open(STDERR, ">&STDOUT");
 	# need to close stdin on linux for some suid programs e.g. chsh (!)
@@ -1251,10 +1251,27 @@
 		$ENV{LD_LIBRARY_PATH} = $ld_path;
 	}
 
-	# currently, no difference between OSs
-	$ENV{LD_DEBUG} = "files,bindings";
-	exec 'ldd', '-r', $file;
-	exit 1;	# exec failed
+	my $ldlinux = '';
+	open(DLFIND,"ldd $file0 |") or die "open: ldd: $!";
+	while (<DLFIND>) {
+	    /ld-linux/ and /(\S+)/ and $ldlinux = $1;
+	}
+	close(DLFIND);
+	if ( $ldlinux =~ /^$/ ) {
+	    # currently, no difference between OSs
+	    $ENV{LD_DEBUG} = "files,bindings";
+	    exec 'ldd', '-r', $file;
+	    exit 1;	# exec failed
+	}
+	else {
+	    $ENV{LD_DEBUG} = "files,bindings";
+	    $ENV{LD_VERBOSE} = "yes";
+	    $ENV{LD_WARN} = "yes";
+	    $ENV{LD_BIND_NOW} = "yes";
+	    $ENV{LD_TRACE_LOADED_OBJECTS} = "1";
+	    exec $ldlinux, $file0;
+	    exit 1;	# exec failed
+	}
 }
 
 #


Index: abicheck.spec
===================================================================
RCS file: /cvs/extras/rpms/abicheck/devel/abicheck.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- abicheck.spec	16 Aug 2005 13:38:37 -0000	1.21
+++ abicheck.spec	16 Aug 2005 20:51:30 -0000	1.22
@@ -3,7 +3,7 @@
 Summary: 	ABI checking tool
 Name: 		abicheck
 Version: 	1.2
-Release: 	8
+Release: 	9
 License: 	LGPL
 Group: 		Applications/File
 URL: 		http://abicheck.sourceforge.net/
@@ -13,6 +13,7 @@
 Patch2:		abicheck-1.2-bindings-fc4.patch
 Patch3:		abicheck-1.2-libgcc.patch
 Patch4:		abicheck-1.2-fortify-source-fc5.patch
+Patch5:		abicheck-1.2-ldlinux.patch
 BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
 Requires:	binutils perl
 
@@ -30,6 +31,7 @@
 %patch2 -p1 -b .bindings-fc4
 %patch3 -p1 -b .libgcc
 %patch4 -p1 -b .fortify-source-fc5
+%patch5 -p1 -b .ldlinux
 sed -i -e 's!/usr/lib/!%{_libdir}/!g' test/Makefile
 
 
@@ -45,7 +47,6 @@
 
 
 %check
-cd test
 make test
 
 
@@ -61,6 +62,10 @@
 
 
 %changelog
+* Tue Aug 16 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2-9
+- Patch abicheck to run dynamic linker directly instead of
+  using ldd and receiving its intermixed lines.
+
 * Mon Aug 15 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2-8
 - Add libgcc symbols.
 - Add more _FORTIFY_SOURCE symbols.




More information about the scm-commits mailing list