diff --git a/ltrace-0.6.0-libs.patch b/ltrace-0.6.0-libs.patch index 5d2557f..a433ee2 100644 --- a/ltrace-0.6.0-libs.patch +++ b/ltrace-0.6.0-libs.patch @@ -10188,3 +10188,53 @@ diff -urp ltrace-0.6.0-orig/sysdeps/linux-gnu/Makefile.in ltrace-0.6.0/sysdeps/l EXTRA_DIST = \ arch_mksyscallent \ +diff --git a/ltrace-elf.c b/ltrace-elf.c +index a311c5f..b1af070 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -175,8 +175,8 @@ need_data(Elf_Data *data, GElf_Xword offset, GElf_Xword size) + { + assert(data != NULL); + if (data->d_size < size || offset > data->d_size - size) { +- debug(1, "Not enough data to read %zd-byte value" +- " at offset %zd.", size, offset); ++ debug(1, "Not enough data to read %"PRId64"-byte value" ++ " at offset %"PRId64".", size, offset); + return -1; + } + return 0; +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 3b6a25f..9717738 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -230,7 +230,9 @@ arch_translate_address_dyn(struct Process *proc, + error(0, errno, "dynamic .opd translation of %p", addr); + return -1; + } +- *ret = (target_address_t)value; ++ /* XXX The double cast should be removed when ++ * target_address_t becomes integral type. */ ++ *ret = (target_address_t)(uintptr_t)value; + return 0; + } + +@@ -243,14 +245,17 @@ arch_translate_address(struct ltelf *lte, + target_address_t addr, target_address_t *ret) + { + if (lte->ehdr.e_machine == EM_PPC64) { +- GElf_Xword offset = (GElf_Addr)addr - lte->arch.opd_base; ++ /* XXX The double cast should be removed when ++ * target_address_t becomes integral type. */ ++ GElf_Xword offset ++ = (GElf_Addr)(uintptr_t)addr - lte->arch.opd_base; + uint64_t value; + if (elf_read_u64(lte->arch.opd_data, offset, &value) < 0) { + error(0, 0, "static .opd translation of %p: %s", addr, + elf_errmsg(-1)); + return -1; + } +- *ret = (target_address_t)(value + lte->bias); ++ *ret = (target_address_t)(uintptr_t)(value + lte->bias); + return 0; + } + diff --git a/ltrace.spec b/ltrace.spec index 2f9bc85..ef83315 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.6.0 -Release: 11%{?dist} +Release: 12%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -88,6 +88,9 @@ echo ====================TESTING END===================== %config(noreplace) %{_sysconfdir}/ltrace.conf %changelog +* Mon Apr 30 2012 Petr Machata - 0.6.0-12 +- Fix 32-bit builds + * Mon Apr 30 2012 Petr Machata - 0.6.0-11 - Fix detach from sleeping process - Add limited support for return from tail call