rpms/ltrace/devel ltrace-opd.patch, NONE, 1.1 ltrace-testsuite.patch, 1.4, 1.5 ltrace.spec, 1.29, 1.30

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Apr 24 10:24:24 UTC 2006


Author: pmachata

Update of /cvs/dist/rpms/ltrace/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv29971

Modified Files:
	ltrace-testsuite.patch ltrace.spec 
Added Files:
	ltrace-opd.patch 
Log Message:
- turn off opd translation on ia64, GElf already gives us function
  address.
- turn on main-internal test, it should pass now.



ltrace-opd.patch:
 elf.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

--- NEW FILE ltrace-opd.patch ---
diff -BburpdN ltrace-0.4/elf.c ltrace-0.4-opd/elf.c
--- ltrace-0.4/elf.c	2006-04-24 12:08:51.000000000 +0200
+++ ltrace-0.4-opd/elf.c	2006-04-24 12:16:28.000000000 +0200
@@ -23,7 +23,7 @@ static void add_library_symbol(GElf_Addr
 			       struct library_symbol **library_symbolspp,
 			       int use_elf_plt2addr, int is_weak);
 static int in_load_libraries(const char *name, struct ltelf *lte);
-static GElf_Addr elf_plt2addr(struct ltelf *ltc, void *addr);
+static GElf_Addr elf_opd2addr(struct ltelf *ltc, void *addr);
 
 extern char *PLTs_initialized_by_here;
 
@@ -328,7 +328,7 @@ static int in_load_libraries(const char 
 	return 0;
 }
 
-static GElf_Addr elf_plt2addr(struct ltelf *lte, void *addr)
+static GElf_Addr elf_opd2addr(struct ltelf *lte, void *addr)
 {
 	long base;
 	long offset;
@@ -337,12 +337,18 @@ static GElf_Addr elf_plt2addr(struct lte
 	if (!lte->opd)
 		return (GElf_Addr) addr;
 
+#ifdef __ia64__
+	/* XXX: On Itaniums, gelf seems to return function address
+	   instead of address of function descriptor. */
+	ret_val = (GElf_Addr)addr;
+#else
 	base = (long)lte->opd->d_buf;
 	offset = (long)addr - (long)lte->opd_addr;
 	if (offset > lte->opd_size)
 		error(EXIT_FAILURE, 0, "static plt not in .opd");
 
 	ret_val = (GElf_Addr) * (long *)(base + offset);
+#endif
 	return ret_val;
 }
 
@@ -438,7 +444,7 @@ struct library_symbol *read_elf(struct p
 			if (xptr->name && strcmp(xptr->name, name) == 0) {
 				/* FIXME: Should be able to use &library_symbols as above.  But
 				   when you do, none of the real library symbols cause breaks. */
-				add_library_symbol(elf_plt2addr
+				add_library_symbol(elf_opd2addr
 						   (lte, (void *)addr), name,
 						   lib_tail, 1, 0);
 				xptr->found = 1;

ltrace-testsuite.patch:
 ChangeLog                                            |   58 +++
 Makefile.in                                          |   10 
 configure                                            |    2 
 configure.ac                                         |    5 
 testsuite/Makefile.in                                |   72 ++++
 testsuite/README                                     |  244 ++++++++++++++++
 testsuite/config/unix.exp                            |    1 
 testsuite/lib/compiler.c                             |   58 +++
 testsuite/lib/compiler.cc                            |   45 +++
 testsuite/lib/ltrace.exp                             |  277 +++++++++++++++++++
 testsuite/ltrace.main/Makefile.in                    |   34 ++
 testsuite/ltrace.main/main-internal-1.c              |    8 
 testsuite/ltrace.main/main-internal.c                |   19 +
 testsuite/ltrace.main/main-internal.exp              |   33 ++
 testsuite/ltrace.main/main-lib.c                     |    7 
 testsuite/ltrace.main/main.c                         |   21 +
 testsuite/ltrace.main/main.exp                       |   39 ++
 testsuite/ltrace.main/signals.c                      |   48 +++
 testsuite/ltrace.main/signals.exp                    |   39 ++
 testsuite/ltrace.main/system_calls.c                 |   68 ++++
 testsuite/ltrace.main/system_calls.exp               |   67 ++++
 testsuite/ltrace.minor/Makefile.in                   |   37 ++
 testsuite/ltrace.minor/attach-process.c              |   16 +
 testsuite/ltrace.minor/attach-process.exp            |   38 ++
 testsuite/ltrace.minor/count-record.c                |   51 +++
 testsuite/ltrace.minor/count-record.exp              |   77 +++++
 testsuite/ltrace.minor/demangle-lib.cpp              |   97 ++++++
 testsuite/ltrace.minor/demangle.cpp                  |  121 ++++++++
 testsuite/ltrace.minor/demangle.exp                  |   63 ++++
 testsuite/ltrace.minor/demangle.h                    |   36 ++
 testsuite/ltrace.minor/print-instruction-pointer.c   |   11 
 testsuite/ltrace.minor/print-instruction-pointer.exp |   42 ++
 testsuite/ltrace.minor/time-record-T.exp             |   84 +++++
 testsuite/ltrace.minor/time-record-tt.exp            |  107 +++++++
 testsuite/ltrace.minor/time-record-ttt.exp           |  112 +++++++
 testsuite/ltrace.minor/time-record.c                 |   23 +
 testsuite/ltrace.minor/trace-clone.c                 |   43 ++
 testsuite/ltrace.minor/trace-clone.exp               |   44 +++
 testsuite/ltrace.minor/trace-fork.c                  |   33 ++
 testsuite/ltrace.minor/trace-fork.exp                |   40 ++
 testsuite/ltrace.torture/Makefile.in                 |   34 ++
 testsuite/ltrace.torture/signals.c                   |   44 +++
 testsuite/ltrace.torture/signals.exp                 |   37 ++
 testsuite/run-my-tests.sh                            |   43 ++
 44 files changed, 2382 insertions(+), 6 deletions(-)

Index: ltrace-testsuite.patch
===================================================================
RCS file: /cvs/dist/rpms/ltrace/devel/ltrace-testsuite.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ltrace-testsuite.patch	12 Apr 2006 15:23:26 -0000	1.4
+++ ltrace-testsuite.patch	24 Apr 2006 10:24:21 -0000	1.5
@@ -1184,7 +1184,7 @@
 +}
 +
 +set pattern "display"
-+#ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 12 
++ltrace_verify_output ${srcdir}/${subdir}/${testfile}.ltrace $pattern 12 
 Index: testsuite/ltrace.main/main-lib.c
 ===================================================================
 --- testsuite/ltrace.main/main-lib.c	(revision 0)


Index: ltrace.spec
===================================================================
RCS file: /cvs/dist/rpms/ltrace/devel/ltrace.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ltrace.spec	12 Apr 2006 15:23:26 -0000	1.29
+++ ltrace.spec	24 Apr 2006 10:24:21 -0000	1.30
@@ -1,10 +1,11 @@
 Summary: Tracks runtime library calls from dynamically linked executables.
 Name: ltrace
 Version: 0.4
-Release: 1.3
+Release: 1.4
 Source: ftp://ftp.debian.org/debian/pool/main/l/ltrace/ltrace_%{version}.orig.tar.gz
 Patch0: ltrace-opt_x.patch
 Patch1: ltrace-testsuite.patch
+Patch2: ltrace-opd.patch
 License: GPL
 Group: Development/Debuggers
 ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 s390 s390x alpha sparc
@@ -26,11 +27,13 @@
 %setup -q
 %patch0 -p0
 %patch1 -p0
+%patch2 -p1
 sed -i -e 's/-o root -g root//' Makefile.in
 
 %build
-export CC="gcc`echo $RPM_OPT_FLAGS | sed -n 's/^.*\(-m[36][124]\).*$/ \1/p'`"
-%configure CC="$CC"
+#export CC="gcc`echo $RPM_OPT_FLAGS | sed -n 's/^.*\(-m[36][124]\).*$/ \1/p'`"
+%configure
+#CC="$CC"
 make
 
 %install
@@ -52,6 +55,11 @@
 %config /etc/ltrace.conf
 
 %changelog
+* Mon Apr 24 2006 Petr Machata <pmachata at redhat.com> - 0.4-1.4
+- turn off opd translation on ia64, GElf already gives us function
+  address.
+- turn on main-internal test, it should pass now.
+
 * Wed Apr 12 2006 Petr Machata <pmachata at redhat.com> - 0.4-1.2
 - svn fix for opt_x patch
 - patches for testsuite for s390{,x}




More information about the fedora-cvs-commits mailing list