diff --git a/.ltrace.metadata b/.ltrace.metadata new file mode 100644 index 0000000..5e7fbca --- /dev/null +++ b/.ltrace.metadata @@ -0,0 +1 @@ +74029042af10b0e9fca6acccb016ce096460a176 SOURCES/ltrace-0.7.91.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/ltrace-0.7.91-arm.patch b/SOURCES/ltrace-0.7.91-arm.patch new file mode 100644 index 0000000..84c7d0d --- /dev/null +++ b/SOURCES/ltrace-0.7.91-arm.patch @@ -0,0 +1,610 @@ +diff --git a/ltrace-elf.c b/ltrace-elf.c +index 92b642b..6f86d56 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -531,6 +531,38 @@ elf_read_relocs(struct ltelf *lte, Elf_Scn *scn, GElf_Shdr *shdr, + return 0; + } + ++int ++elf_load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep) ++{ ++ Elf_Scn *scn; ++ GElf_Shdr shdr; ++ if (elf_get_section_type(lte, SHT_DYNAMIC, &scn, &shdr) < 0 ++ || scn == NULL) { ++ fail: ++ fprintf(stderr, "Couldn't get SHT_DYNAMIC: %s\n", ++ elf_errmsg(-1)); ++ return -1; ++ } ++ ++ Elf_Data *data = elf_loaddata(scn, &shdr); ++ if (data == NULL) ++ goto fail; ++ ++ size_t j; ++ for (j = 0; j < shdr.sh_size / shdr.sh_entsize; ++j) { ++ GElf_Dyn dyn; ++ if (gelf_getdyn(data, j, &dyn) == NULL) ++ goto fail; ++ ++ if(dyn.d_tag == tag) { ++ *valuep = dyn.d_un.d_ptr; ++ return 0; ++ } ++ } ++ ++ return -1; ++} ++ + static int + ltelf_read_elf(struct ltelf *lte, const char *filename) + { +diff --git a/ltrace-elf.h b/ltrace-elf.h +index ea14512..db4ffe9 100644 +--- a/ltrace-elf.h ++++ b/ltrace-elf.h +@@ -139,6 +139,10 @@ struct elf_each_symbol_t { + int elf_read_relocs(struct ltelf *lte, Elf_Scn *scn, GElf_Shdr *shdr, + struct vect *rela_vec); + ++/* Read a given DT_ TAG from LTE. Value is returned in *VALUEP. ++ * Returns 0 on success or a negative value on failure. */ ++int elf_load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep); ++ + /* Read, respectively, 1, 2, 4, or 8 bytes from Elf data at given + * OFFSET, and store it in *RETP. Returns 0 on success or a negative + * value if there's not enough data. */ +diff --git a/sysdeps/linux-gnu/arm/arch.h b/sysdeps/linux-gnu/arm/arch.h +index 58a7fdf..6d0d902 100644 +--- a/sysdeps/linux-gnu/arm/arch.h ++++ b/sysdeps/linux-gnu/arm/arch.h +@@ -22,6 +22,8 @@ + #ifndef LTRACE_ARM_ARCH_H + #define LTRACE_ARM_ARCH_H + ++#include ++ + #define ARCH_HAVE_ENABLE_BREAKPOINT 1 + #define ARCH_HAVE_DISABLE_BREAKPOINT 1 + +@@ -47,7 +49,7 @@ struct arch_breakpoint_data { + + #define ARCH_HAVE_LTELF_DATA + struct arch_ltelf_data { +- /* We have this only for the hooks. */ ++ Elf_Data *jmprel_data; + }; + + #define ARCH_HAVE_LIBRARY_DATA +diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c +index 5081d78..b500448 100644 +--- a/sysdeps/linux-gnu/arm/fetch.c ++++ b/sysdeps/linux-gnu/arm/fetch.c +@@ -32,200 +32,12 @@ + #include "backend.h" + #include "fetch.h" + #include "library.h" +-#include "ltrace-elf.h" + #include "proc.h" + #include "ptrace.h" + #include "regs.h" + #include "type.h" + #include "value.h" + +-static int +-get_hardfp(uint64_t abi_vfp_args) +-{ +- if (abi_vfp_args == 2) +- fprintf(stderr, +- "Tag_ABI_VFP_args value 2 (tool chain-specific " +- "conventions) not supported.\n"); +- return abi_vfp_args == 1; +-} +- +-int +-arch_elf_init(struct ltelf *lte, struct library *lib) +-{ +- /* Nothing in this section is strictly critical. It's not +- * that much of a deal if we fail to guess right whether the +- * ABI is softfp or hardfp. */ +- unsigned hardfp = 0; +- +- Elf_Scn *scn; +- Elf_Data *data; +- GElf_Shdr shdr; +- if (elf_get_section_type(lte, SHT_ARM_ATTRIBUTES, &scn, &shdr) < 0 +- || (scn != NULL && (data = elf_loaddata(scn, &shdr)) == NULL)) { +- fprintf(stderr, +- "Error when obtaining ARM attribute section: %s\n", +- elf_errmsg(-1)); +- goto done; +- +- } else if (scn != NULL && data != NULL) { +- GElf_Xword offset = 0; +- uint8_t version; +- if (elf_read_next_u8(data, &offset, &version) < 0) { +- goto done; +- } else if (version != 'A') { +- fprintf(stderr, "Unsupported ARM attribute section " +- "version %d ('%c').\n", version, version); +- goto done; +- } +- +- do { +- const char signature[] = "aeabi"; +- /* N.B. LEN is including the length field +- * itself. */ +- uint32_t sec_len; +- if (elf_read_u32(data, offset, &sec_len) < 0 +- || !elf_can_read_next(data, offset, sec_len)) { +- goto done; +- } +- const GElf_Xword next_offset = offset + sec_len; +- offset += 4; +- +- if (sec_len < 4 + sizeof signature +- || strcmp(signature, data->d_buf + offset) != 0) +- goto skip; +- offset += sizeof signature; +- +- const GElf_Xword offset0 = offset; +- uint64_t tag; +- uint32_t sub_len; +- if (elf_read_next_uleb128(data, &offset, &tag) < 0 +- || elf_read_next_u32(data, &offset, &sub_len) < 0 +- || !elf_can_read_next(data, offset0, sub_len)) +- goto done; +- +- if (tag != 1) +- /* IHI0045D_ABI_addenda: "section and +- * symbol attributes are deprecated +- * [...] consumers are permitted to +- * ignore them." */ +- goto skip; +- +- while (offset < offset0 + sub_len) { +- if (elf_read_next_uleb128(data, +- &offset, &tag) < 0) +- goto done; +- +- switch (tag) { +- uint64_t v; +- case 6: /* Tag_CPU_arch */ +- case 7: /* Tag_CPU_arch_profile */ +- case 8: /* Tag_ARM_ISA_use */ +- case 9: /* Tag_THUMB_ISA_use */ +- case 10: /* Tag_FP_arch */ +- case 11: /* Tag_WMMX_arch */ +- case 12: /* Tag_Advanced_SIMD_arch */ +- case 13: /* Tag_PCS_config */ +- case 14: /* Tag_ABI_PCS_R9_use */ +- case 15: /* Tag_ABI_PCS_RW_data */ +- case 16: /* Tag_ABI_PCS_RO_data */ +- case 17: /* Tag_ABI_PCS_GOT_use */ +- case 18: /* Tag_ABI_PCS_wchar_t */ +- case 19: /* Tag_ABI_FP_rounding */ +- case 20: /* Tag_ABI_FP_denormal */ +- case 21: /* Tag_ABI_FP_exceptions */ +- case 22: /* Tag_ABI_FP_user_exceptions */ +- case 23: /* Tag_ABI_FP_number_model */ +- case 24: /* Tag_ABI_align_needed */ +- case 25: /* Tag_ABI_align_preserved */ +- case 26: /* Tag_ABI_enum_size */ +- case 27: /* Tag_ABI_HardFP_use */ +- case 28: /* Tag_ABI_VFP_args */ +- case 29: /* Tag_ABI_WMMX_args */ +- case 30: /* Tag_ABI_optimization_goals */ +- case 31: /* Tag_ABI_FP_optimization_goals */ +- case 32: /* Tag_compatibility */ +- case 34: /* Tag_CPU_unaligned_access */ +- case 36: /* Tag_FP_HP_extension */ +- case 38: /* Tag_ABI_FP_16bit_format */ +- case 42: /* Tag_MPextension_use */ +- case 70: /* Tag_MPextension_use as well */ +- case 44: /* Tag_DIV_use */ +- case 64: /* Tag_nodefaults */ +- case 66: /* Tag_T2EE_use */ +- case 68: /* Tag_Virtualization_use */ +- uleb128: +- if (elf_read_next_uleb128 +- (data, &offset, &v) < 0) +- goto done; +- if (tag == 28) +- hardfp = get_hardfp(v); +- if (tag != 32) +- continue; +- +- /* Tag 32 has two arguments, +- * fall through. */ +- +- case 4: /* Tag_CPU_raw_name */ +- case 5: /* Tag_CPU_name */ +- case 65: /* Tag_also_compatible_with */ +- case 67: /* Tag_conformance */ +- ntbs: +- offset += strlen(data->d_buf +- + offset) + 1; +- continue; +- } +- +- /* Handle unknown tags in a generic +- * manner, if possible. */ +- if (tag <= 32) { +- fprintf(stderr, +- "Unknown tag %lld " +- "at offset %#llx " +- "of ARM attribute section.", +- tag, offset); +- goto skip; +- } else if (tag % 2 == 0) { +- goto uleb128; +- } else { +- goto ntbs; +- } +- } +- +- skip: +- offset = next_offset; +- +- } while (elf_can_read_next(data, offset, 1)); +- +- } +- +-done: +- lib->arch.hardfp = hardfp; +- return 0; +-} +- +-void +-arch_elf_destroy(struct ltelf *lte) +-{ +-} +- +-int +-arch_library_init(struct library *lib) +-{ +- return 0; +-} +- +-void +-arch_library_destroy(struct library *lib) +-{ +-} +- +-int +-arch_library_clone(struct library *retp, struct library *lib) +-{ +- retp->arch = lib->arch; +- return 0; +-} +- + enum { + /* How many (double) VFP registers the AAPCS uses for + * parameter passing. */ +diff --git a/sysdeps/linux-gnu/arm/plt.c b/sysdeps/linux-gnu/arm/plt.c +index d1bf7ca..9e9e37f 100644 +--- a/sysdeps/linux-gnu/arm/plt.c ++++ b/sysdeps/linux-gnu/arm/plt.c +@@ -1,5 +1,6 @@ + /* + * This file is part of ltrace. ++ * Copyright (C) 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2010 Zach Welch, CodeSourcery + * Copyright (C) 2004,2008,2009 Juan Cespedes + * +@@ -20,20 +21,205 @@ + */ + + #include ++#include ++#include + + #include "proc.h" + #include "library.h" + #include "ltrace-elf.h" + + static int ++get_hardfp(uint64_t abi_vfp_args) ++{ ++ if (abi_vfp_args == 2) ++ fprintf(stderr, ++ "Tag_ABI_VFP_args value 2 (tool chain-specific " ++ "conventions) not supported.\n"); ++ return abi_vfp_args == 1; ++} ++ ++int ++arch_elf_init(struct ltelf *lte, struct library *lib) ++{ ++ GElf_Addr jmprel_addr; ++ Elf_Scn *jmprel_sec; ++ GElf_Shdr jmprel_shdr; ++ if (elf_load_dynamic_entry(lte, DT_JMPREL, &jmprel_addr) < 0 ++ || elf_get_section_covering(lte, jmprel_addr, ++ &jmprel_sec, &jmprel_shdr) < 0 ++ || jmprel_sec == NULL) ++ return -1; ++ ++ lte->arch.jmprel_data = elf_loaddata(jmprel_sec, &jmprel_shdr); ++ if (lte->arch.jmprel_data == NULL) ++ return -1; ++ ++ /* Nothing in this section is strictly critical. It's not ++ * that much of a deal if we fail to guess right whether the ++ * ABI is softfp or hardfp. */ ++ unsigned hardfp = 0; ++ ++ Elf_Scn *scn; ++ Elf_Data *data; ++ GElf_Shdr shdr; ++ if (elf_get_section_type(lte, SHT_ARM_ATTRIBUTES, &scn, &shdr) < 0 ++ || (scn != NULL && (data = elf_loaddata(scn, &shdr)) == NULL)) { ++ fprintf(stderr, ++ "Error when obtaining ARM attribute section: %s\n", ++ elf_errmsg(-1)); ++ goto done; ++ ++ } else if (scn != NULL && data != NULL) { ++ GElf_Xword offset = 0; ++ uint8_t version; ++ if (elf_read_next_u8(data, &offset, &version) < 0) { ++ goto done; ++ } else if (version != 'A') { ++ fprintf(stderr, "Unsupported ARM attribute section " ++ "version %d ('%c').\n", version, version); ++ goto done; ++ } ++ ++ do { ++ const char signature[] = "aeabi"; ++ /* N.B. LEN is including the length field ++ * itself. */ ++ uint32_t sec_len; ++ if (elf_read_u32(data, offset, &sec_len) < 0 ++ || !elf_can_read_next(data, offset, sec_len)) { ++ goto done; ++ } ++ const GElf_Xword next_offset = offset + sec_len; ++ offset += 4; ++ ++ if (sec_len < 4 + sizeof signature ++ || strcmp(signature, data->d_buf + offset) != 0) ++ goto skip; ++ offset += sizeof signature; ++ ++ const GElf_Xword offset0 = offset; ++ uint64_t tag; ++ uint32_t sub_len; ++ if (elf_read_next_uleb128(data, &offset, &tag) < 0 ++ || elf_read_next_u32(data, &offset, &sub_len) < 0 ++ || !elf_can_read_next(data, offset0, sub_len)) ++ goto done; ++ ++ if (tag != 1) ++ /* IHI0045D_ABI_addenda: "section and ++ * symbol attributes are deprecated ++ * [...] consumers are permitted to ++ * ignore them." */ ++ goto skip; ++ ++ while (offset < offset0 + sub_len) { ++ if (elf_read_next_uleb128(data, ++ &offset, &tag) < 0) ++ goto done; ++ ++ switch (tag) { ++ uint64_t v; ++ case 6: /* Tag_CPU_arch */ ++ case 7: /* Tag_CPU_arch_profile */ ++ case 8: /* Tag_ARM_ISA_use */ ++ case 9: /* Tag_THUMB_ISA_use */ ++ case 10: /* Tag_FP_arch */ ++ case 11: /* Tag_WMMX_arch */ ++ case 12: /* Tag_Advanced_SIMD_arch */ ++ case 13: /* Tag_PCS_config */ ++ case 14: /* Tag_ABI_PCS_R9_use */ ++ case 15: /* Tag_ABI_PCS_RW_data */ ++ case 16: /* Tag_ABI_PCS_RO_data */ ++ case 17: /* Tag_ABI_PCS_GOT_use */ ++ case 18: /* Tag_ABI_PCS_wchar_t */ ++ case 19: /* Tag_ABI_FP_rounding */ ++ case 20: /* Tag_ABI_FP_denormal */ ++ case 21: /* Tag_ABI_FP_exceptions */ ++ case 22: /* Tag_ABI_FP_user_exceptions */ ++ case 23: /* Tag_ABI_FP_number_model */ ++ case 24: /* Tag_ABI_align_needed */ ++ case 25: /* Tag_ABI_align_preserved */ ++ case 26: /* Tag_ABI_enum_size */ ++ case 27: /* Tag_ABI_HardFP_use */ ++ case 28: /* Tag_ABI_VFP_args */ ++ case 29: /* Tag_ABI_WMMX_args */ ++ case 30: /* Tag_ABI_optimization_goals */ ++ case 31: /* Tag_ABI_FP_optimization_goals */ ++ case 32: /* Tag_compatibility */ ++ case 34: /* Tag_CPU_unaligned_access */ ++ case 36: /* Tag_FP_HP_extension */ ++ case 38: /* Tag_ABI_FP_16bit_format */ ++ case 42: /* Tag_MPextension_use */ ++ case 70: /* Tag_MPextension_use as well */ ++ case 44: /* Tag_DIV_use */ ++ case 64: /* Tag_nodefaults */ ++ case 66: /* Tag_T2EE_use */ ++ case 68: /* Tag_Virtualization_use */ ++ uleb128: ++ if (elf_read_next_uleb128 ++ (data, &offset, &v) < 0) ++ goto done; ++ if (tag == 28) ++ hardfp = get_hardfp(v); ++ if (tag != 32) ++ continue; ++ ++ /* Tag 32 has two arguments, ++ * fall through. */ ++ ++ case 4: /* Tag_CPU_raw_name */ ++ case 5: /* Tag_CPU_name */ ++ case 65: /* Tag_also_compatible_with */ ++ case 67: /* Tag_conformance */ ++ ntbs: ++ offset += strlen(data->d_buf ++ + offset) + 1; ++ continue; ++ } ++ ++ /* Handle unknown tags in a generic ++ * manner, if possible. */ ++ if (tag <= 32) { ++ fprintf(stderr, ++ "Unknown tag %lld " ++ "at offset %#llx " ++ "of ARM attribute section.", ++ tag, offset); ++ goto skip; ++ } else if (tag % 2 == 0) { ++ goto uleb128; ++ } else { ++ goto ntbs; ++ } ++ } ++ ++ skip: ++ offset = next_offset; ++ ++ } while (elf_can_read_next(data, offset, 1)); ++ ++ } ++ ++done: ++ lib->arch.hardfp = hardfp; ++ return 0; ++} ++ ++void ++arch_elf_destroy(struct ltelf *lte) ++{ ++} ++ ++static int + arch_plt_entry_has_stub(struct ltelf *lte, size_t off) { +- uint16_t op = *(uint16_t *)((char *)lte->relplt->d_buf + off); ++ char *buf = (char *) lte->arch.jmprel_data->d_buf; ++ uint16_t op = *(uint16_t *) (buf + off); + return op == 0x4778; + } + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { +- size_t start = lte->relplt->d_size + 12; ++ size_t start = lte->arch.jmprel_data->d_size + 12; + size_t off = start + 20, i; + for (i = 0; i < ndx; i++) + off += arch_plt_entry_has_stub(lte, off) ? 16 : 12; +@@ -47,3 +233,21 @@ sym2addr(struct process *proc, struct library_symbol *sym) + { + return sym->enter_addr; + } ++ ++int ++arch_library_init(struct library *lib) ++{ ++ return 0; ++} ++ ++void ++arch_library_destroy(struct library *lib) ++{ ++} ++ ++int ++arch_library_clone(struct library *retp, struct library *lib) ++{ ++ retp->arch = lib->arch; ++ return 0; ++} +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 5e3ffe1..3ec1397 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -402,38 +402,6 @@ get_glink_vma(struct ltelf *lte, GElf_Addr ppcgot, Elf_Data *plt_data) + } + + static int +-load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep) +-{ +- Elf_Scn *scn; +- GElf_Shdr shdr; +- if (elf_get_section_type(lte, SHT_DYNAMIC, &scn, &shdr) < 0 +- || scn == NULL) { +- fail: +- fprintf(stderr, "Couldn't get SHT_DYNAMIC: %s\n", +- elf_errmsg(-1)); +- return -1; +- } +- +- Elf_Data *data = elf_loaddata(scn, &shdr); +- if (data == NULL) +- goto fail; +- +- size_t j; +- for (j = 0; j < shdr.sh_size / shdr.sh_entsize; ++j) { +- GElf_Dyn dyn; +- if (gelf_getdyn(data, j, &dyn) == NULL) +- goto fail; +- +- if(dyn.d_tag == tag) { +- *valuep = dyn.d_un.d_ptr; +- return 0; +- } +- } +- +- return -1; +-} +- +-static int + nonzero_data(Elf_Data *data) + { + /* We are not supposed to get here if there's no PLT. */ +@@ -488,8 +456,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + Elf_Scn *rela_sec; + GElf_Shdr rela_shdr; + if ((lte->ehdr.e_machine == EM_PPC64 || lte->arch.secure_plt) +- && load_dynamic_entry(lte, DT_RELA, &rela) == 0 +- && load_dynamic_entry(lte, DT_RELASZ, &relasz) == 0 ++ && elf_load_dynamic_entry(lte, DT_RELA, &rela) == 0 ++ && elf_load_dynamic_entry(lte, DT_RELASZ, &relasz) == 0 + && elf_get_section_covering(lte, rela, &rela_sec, &rela_shdr) == 0 + && rela_sec != NULL) { + +@@ -509,7 +477,7 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + if (lte->ehdr.e_machine == EM_PPC && lte->arch.secure_plt) { + GElf_Addr ppcgot; +- if (load_dynamic_entry(lte, DT_PPC_GOT, &ppcgot) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PPC_GOT, &ppcgot) < 0) { + fprintf(stderr, "couldn't find DT_PPC_GOT\n"); + return -1; + } +@@ -522,7 +490,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + } else if (lte->ehdr.e_machine == EM_PPC64) { + GElf_Addr glink_vma; +- if (load_dynamic_entry(lte, DT_PPC64_GLINK, &glink_vma) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PPC64_GLINK, ++ &glink_vma) < 0) { + fprintf(stderr, "couldn't find DT_PPC64_GLINK\n"); + return -1; + } +@@ -532,8 +501,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + } else { + /* By exhaustion--PPC32 BSS. */ +- if (load_dynamic_entry(lte, DT_PLTGOT, +- &lib->arch.pltgot_addr) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PLTGOT, ++ &lib->arch.pltgot_addr) < 0) { + fprintf(stderr, "couldn't find DT_PLTGOT\n"); + return -1; + } diff --git a/SPECS/ltrace.spec b/SPECS/ltrace.spec new file mode 100644 index 0000000..78b4d2c --- /dev/null +++ b/SPECS/ltrace.spec @@ -0,0 +1,411 @@ +Summary: Tracks runtime library calls from dynamically linked executables +Name: ltrace +Version: 0.7.91 +Release: 1%{?dist} +URL: http://ltrace.alioth.debian.org/ +License: GPLv2+ +Group: Development/Debuggers + +BuildRequires: elfutils-libelf-devel dejagnu +BuildRequires: libselinux-devel + +# Note: this URL needs to be updated for each release, as the file +# number changes for each file. Full list of released files is at: +# https://alioth.debian.org/frs/?group_id=30892 +Source: ltrace-%{version}.tar.bz2 + +# Merge of several upstream commits that fixes compilation on ARM. +Patch0: ltrace-0.7.91-arm.patch + +%description +Ltrace is a debugging program which runs a specified command until the +command exits. While the command is executing, ltrace intercepts and +records both the dynamic library calls called by the executed process +and the signals received by the executed process. Ltrace can also +intercept and print system calls executed by the process. + +You should install ltrace if you need a sysadmin tool for tracking the +execution of processes. + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 + +%build +%configure +make %{?_smp_mflags} + +%install +make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} docdir=%{_docdir}/ltrace-%{version}/ install + +# The testsuite is useful for development in real world, but fails in +# koji for some reason. Disable it, but have it handy. +%check +echo ====================TESTING========================= +timeout 180 make check ||: +echo ====================TESTING END===================== + +%files +%defattr(-,root,root) +%doc NEWS +%{_bindir}/ltrace +%{_mandir}/man1/ltrace.1* +%{_mandir}/man5/ltrace.conf.5* +%{_datadir}/ltrace + +%changelog +* Tue Nov 5 2013 Petr Machata - 0.7.91-1 +- Rebase to a pre-release 0.8 +- Drop BR on autoconf and friends + +* Tue Mar 26 2013 Petr Machata - 0.7.2-5 +- On s390, the highest bit in PC address is used to distinguish + between 24-bit and 31-bit addressing modes. Linux used to do this + for us, but not anymore. + (ltrace-0.7.2-s390-set_instruction_pointer.patch) + +* Wed Feb 6 2013 Petr Machata - 0.7.2-4 +- Update the ARM patch (ltrace-0.7.2-arm.patch) with support for + parameter passing conventions. + +* Thu Jan 31 2013 Petr Machata - 0.7.2-3 +- Bring small fixes from master branch + (ltrace-0.7.2-bits.patch; drop ltrace-0.7.2-man.patch) +- Add a patch that implements ARM sofware singlestepping. This mostly + fixes test suite on ARM, though parameter passing conventions are + still not implemented. (ltrace-0.7.2-arm.patch) +- Work around a new GCC warning (ltrace-0.7.2-unused-typedef.patch) + +* Fri Jan 11 2013 Petr Machata - 0.7.2-2 +- Improve documentation: better correlation between ltrace(1) and + --help, other minor improvements in ltrace(1). + (ltrace-0.7.2-man.patch) + +* Mon Dec 10 2012 Petr Machata - 0.7.2-1 +- Upstream 0.7.2 + - Drop all the patches + +* Sat Nov 10 2012 Petr Machata - 0.7.0-1 +- Upstream 0.7.0 + - Drop all the patches + - Upstream patch for missing sysdeps/linux-gnu/ppc/insn.h + (ltrace-0.7.0-ppc-insn.h.patch) + - Upstream patch for installing ltrace.conf.5 to man5 + (ltrace-0.7.0-man5.patch) + +* Mon Oct 1 2012 Petr Machata - 0.6.0-19 +- Upstream patch for ia64 parameter passing + (ltrace-0.6.0-abi-ia64.patch) +- Upstream fix for a bug in computation of time spent in a syscall + (ltrace-0.6.0-syscall-time.patch) +- Upstream fix for a bug in passing struct(float,struct(float,float)) + on x86_64 (ltrace-0.6.0-x86_64-flatten.patch) +- Upstream patch for support of -l option (ltrace-0.6.0-dash-l.patch) +- Several more upstream patches with random cleanups. Those were + brought to Fedora to make porting of other patches easier. + (ltrace-0.6.0-cleanups.patch) + +* Thu Aug 30 2012 Petr Machata - 0.6.0-18 +- PPC64 passes floating point equivalent structures in registers + +* Thu Jul 19 2012 Fedora Release Engineering - 0.6.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jun 1 2012 Petr Machata - 0.6.0-16 +- Look for __cxa_demangle in libstdc++ as well +- Demangle test case should report it's unsupported if demangling + support isn't compiled in (ltrace-0.6.0-demangle.patch) +- Resolves: #827422 + +* Thu May 31 2012 Petr Machata - 0.6.0-15 +- Add upstream patches for parameter passing. Apart from a couple of + fixes, this brings in s390 support (ltrace-0.6.0-abi-s390.patch) + +* Fri May 18 2012 Petr Machata - 0.6.0-14 +- Add upstream patch that improves parameter passing support (the + upstream "revamp" branch) (ltrace-0.6.0-abi.patch) + +* Thu May 3 2012 Petr Machata - 0.6.0-13 +- Check -n argument for validity (ltrace-0.6.0-dash-n.patch) +- Resolves: #818529 +- ltrace-0.6.0-libs-fixes-1.patch + - Fix double free when process initialization fails for some reason + - Don't indent first level of calls + +* 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 +- Fix singlestep over atomic instruction sequence on PPC +- Add extensive upstream patch that implements + - tracing calls done from DSOs + - better tools for filtering symbol tables + - support for tracing PLT calls on PPC64 (not entry points read from .plt) + - support for PPC32 old-style (BSS) PLT table +- Drop ppc-shift patch that was superseded by the above +- Drop demangle patch that hasn't been applied for some time now + +* Wed Apr 11 2012 Peter Robinson - 0.6.0-10 +- Drop ExclusiveArch as all current Primary/Secondary Arches are supported + +* Wed Apr 11 2012 Petr Machata - 0.6.0-9 +- And patch configure and config.h, not just configure.ac +- Resolves: #810973 + +* Wed Apr 11 2012 Petr Machata - 0.6.0-7 +- Add libselinux-devel BR +- Resolves: #810973 + +* Tue Apr 10 2012 Petr Machata - 0.6.0-6 +- If we fail to attach to traced process, check whether deny_ptrace + isn't enabled. If yes, warn about it. +- Resolves: #810973 + +* Tue Feb 7 2012 Petr Machata - 0.6.0-5 +- Add upstream patches for initial breakpoint insertion. This mostly + fixes tracing on PPC. +- Resolves: #773050 + +* Fri Jan 13 2012 Fedora Release Engineering - 0.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Nov 25 2011 Petr Machata - 0.6.0-3 +- Add several upstream patches that fix various races in tracing + multi-threaded processes +- Add upstream patches for support of tracing across vfork +- Add upstream patches for ppc: excessive shift, and fetching + function arguments + +* Fri Sep 2 2011 Petr Machata - 0.6.0-2 +- Add upstream patches for tracing multi-threaded processes, endian + fixes, and a test suite fixlet + +* Tue Feb 15 2011 Petr Machata - 0.6.0-1 +- Update to 0.6.0 + - Drop most patches + - Port exec-stripped patch + - Add return-string-n patch + - Leave just the testsuite part in ia64-sigill patch + +* Tue Feb 08 2011 Fedora Release Engineering - 0.5-19.45svn +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Dec 9 2010 Petr Machata - 0.5-18.45svn +- Add memmove to /etc/ltrace.conf +- Resolves: #658311 + +* Wed Sep 8 2010 Petr Machata - 0.5-17.45svn +- Fix demangler resolution. Libiberty is not in the default install + anymore, and the fallback configure check for __cxa_demangle doesn't + take into account the possibility that the symbol might be in + libstdc++ instead. +- Resolves: #631069 FTBFS + +* Wed May 19 2010 Petr Machata - 0.5-16.45svn.1 +- When the value of undefined symbol in PPC 32-bit binary is 0, use + PPC-specific magic to compute the PLT slots. +- Fix a problem with tracing stripped binary after execl on + architectures that need PLT reinitalisation breakpoint. +- Support tracing of 31-bit binaries with 64-bit ltrace +- Fix handling of the case where forked child is reported before + parent's fork event +- Patch from Supriya Kannery implements fetching 5th and further + function arguments on s390 + +* Sat Jul 25 2009 Fedora Release Engineering - 0.5-14.45svn +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.5-13.45svn +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Oct 7 2008 Petr Machata - 0.5-12.45svn +- Fix fork & exec patches to apply cleanly under --fuzz=0 +- Resolves: #465036 + +* Fri May 23 2008 Petr Machata - 0.5-11.45svn +- Patch from James M. Leddy, fixes interaction of -c and -o +- Fix compilation by using -D_LARGEFILE64_SOURCE +- related: #447404 + +* Tue Feb 19 2008 Fedora Release Engineering - 0.5-10.45svn +- Autorebuild for GCC 4.3 + +* Wed Sep 12 2007 Petr Machata - 0.5-9.45svn +- Cleanup spec. +- Fix parallel make bug in Makefile. +- resolves: #226109 + +* Thu Aug 16 2007 Petr Machata - 0.5-8.45svn +- Fix licensing tag. + +* Fri May 4 2007 Petr Machata - 0.5-7.45svn +- added fork/exec patches, mostly IBM's work +- added trace-exec tests into suite +- added ia64 sigill patch + +* Thu Jan 25 2007 Petr Machata - 0.5-6.45svn +- tidy up the specfile per rpmlint comments +- fix man page + +* Mon Sep 4 2006 Petr Machata - 0.5-5.45svn +- fix plt handling on ppc32 (symval patch) +- fix attaching to process (attach patch) +- add fork & exec patches from IBM +- adjust weak symbol handling (ppc32fc5 patch) + +* Wed Aug 23 2006 Petr Machata - 0.5-3.45svn +- use "{X}.{release}svn" release string per naming guidelines + +* Tue Aug 22 2006 Petr Machata - 0.5-1.1.45svn +- using dist tag + +* Fri Aug 18 2006 Jesse Keating - 0.5-1.0.45svn.6 +- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc* + (#203001) + +* Fri Jul 14 2006 Petr Machata - 0.5-1.0.45svn.5 +- adding .gnu.hash patch to support new ELF hash table section +- adding testsuite patch to silent some bogus failures + +* Fri Jul 14 2006 Petr Machata - 0.5-1.0.45svn +- adding upstream (svn) version. It contains most of patches that we + already use, and has support for secure PLTs. + +* Wed Jul 12 2006 Jesse Keating - 0.4-1.7.1 +- rebuild + +* Wed Jun 14 2006 Petr Machata - 0.4-1.7 +- drop broken ppc support + +* Thu Jun 1 2006 Petr Machata - 0.4-1.6 +- e_entry patch: use elf's e_entry field instead of looking up _start + symbol, which failed on stripped binaries. + +* Tue May 3 2006 Petr Machata - 0.4-1.5 +- Correct a typo that prevented the inclusion of "demangle.h" +- Adding -Wl,-z,relro + +* Mon Apr 24 2006 Petr Machata - 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 - 0.4-1.2 +- svn fix for opt_x patch +- patches for testsuite for s390{,x} +- turning off main-internal test. Fails on ia64, needs investigation. + +* Fri Apr 7 2006 Petr Machata - 0.4-1 +- Upstream 0.4 +- opt_x patch: New structure for opt_x list elements, now with + 'found'. Using it in options.c, elf.c. +- testsuite patch: Automated testsuite for ltrace. + +* Wed Mar 1 2006 Petr Machata - 0.3.36-4.3 +- include %%{ix86} to ExclusiveArch, instead of mere i386 + +* Fri Feb 10 2006 Jesse Keating - 0.3.36-4.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.3.36-4.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Jan 9 2006 Jakub Jelinek 0.3.36-4 +- added ppc64 and s390x support (IBM) +- added ia64 support (Ian Wienand) + +* Sat Mar 5 2005 Jakub Jelinek 0.3.36-3 +- rebuilt with GCC 4 + +* Tue Dec 14 2004 Jakub Jelinek 0.3.36-2 +- make x86_64 ltrace trace both 32-bit and 64-bit binaries (#141955, + IT#55600) +- fix tracing across execve +- fix printf-style format handling on 64-bit arches + +* Thu Nov 18 2004 Jakub Jelinek 0.3.36-1 +- update to 0.3.36 + +* Mon Oct 11 2004 Jakub Jelinek 0.3.35-1 +- update to 0.3.35 +- update syscall tables from latest kernel source + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Jun 8 2004 Jakub Jelinek 0.3.32-3 +- buildreq elfutils-libelf-devel (#124921) + +* Thu Apr 22 2004 Jakub Jelinek 0.3.32-2 +- fix demangling + +* Thu Apr 22 2004 Jakub Jelinek 0.3.32-1 +- update to 0.3.32 + - fix dict.c assertion (#114359) + - x86_64 support +- rewrite elf.[ch] using libelf +- don't rely on st_value of SHN_UNDEF symbols in binaries, + instead walk .rel{,a}.plt and compute the addresses (#115299) +- fix x86-64 support +- some ltrace.conf additions +- some format string printing fixes + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Feb 3 2003 Jakub Jelinek 0.3.29-1 +- update to 0.3.29 + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Sun Sep 1 2002 Jakub Jelinek 0.3.10-12 +- add a bunch of missing functions to ltrace.conf + (like strlen, ugh) + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Tue May 28 2002 Phil Knirsch +- Added the 'official' s390 patch. + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Fri Jul 20 2001 Jakub Jelinek +- fix stale symlink in documentation directory (#47749) + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Thu Aug 2 2000 Tim Waugh +- fix off-by-one problem in checking syscall number + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Mon Jun 19 2000 Matt Wilson +- rebuilt for next release +- patched Makefile.in to take a hint on mandir (patch2) +- use %%{_mandir} and %%makeinstall + +* Wed Feb 02 2000 Cristian Gafton +- fix description + +* Fri Jan 7 2000 Jeff Johnson +- update to 0.3.10. +- include (but don't apply) sparc patch from Jakub Jellinek. + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 2) + +* Fri Mar 12 1999 Jeff Johnson +- update to 0.3.6. + +* Mon Sep 21 1998 Preston Brown +- upgraded to 0.3.4