[Ltrace-devel] r51 - in ltrace/trunk: . sysdeps/linux-gnu/ppc
Petr Machata
pmachata-guest at costa.debian.org
Tue Jul 18 11:06:27 UTC 2006
Author: pmachata-guest
Date: 2006-07-18 11:06:26 +0000 (Tue, 18 Jul 2006)
New Revision: 51
Modified:
ltrace/trunk/ChangeLog
ltrace/trunk/elf.c
ltrace/trunk/sysdeps/linux-gnu/ppc/arch.h
Log:
Compile-time fixes for ppc32.
Modified: ltrace/trunk/ChangeLog
===================================================================
--- ltrace/trunk/ChangeLog 2006-07-18 10:58:12 UTC (rev 50)
+++ ltrace/trunk/ChangeLog 2006-07-18 11:06:26 UTC (rev 51)
@@ -1,5 +1,12 @@
2006-07-18 Petr Machata <pmachata at redhat.com>
+ * elf.c: replace nonexistant elf_plt2addr with opd2addr, fix
+ typo, and fix WEAK symbol detection
+ * sysdeps/linux-gnu/ppc/arch.h: define breakpoint instruction,
+ its length, etc., also on ppc32
+
+2006-07-18 Petr Machata <pmachata at redhat.com>
+
* elf.c: support .gnu.hash ELF entry
* elf.h: likewise
Modified: ltrace/trunk/elf.c
===================================================================
--- ltrace/trunk/elf.c 2006-07-18 10:58:12 UTC (rev 50)
+++ ltrace/trunk/elf.c 2006-07-18 11:06:26 UTC (rev 51)
@@ -475,7 +475,7 @@
add_library_symbol(addr, name, &library_symbols,
(PLTS_ARE_EXECUTABLE(lte)
? LS_TOPLT_EXEC : LS_TOPLT_POINT),
- ELF64_ST_BIND(sym.st_info) != 0);
+ ELF64_ST_BIND(sym.st_info) == STB_WEAK);
if (!lib_tail)
lib_tail = &(library_symbols->next);
}
@@ -487,7 +487,7 @@
already there. */
main_cheat = (struct opt_x_t *)malloc(sizeof(struct opt_x_t));
if (main_cheat == NULL)
- error(EXIT_FAILURE, 0, "Couldn allocate memory");
+ error(EXIT_FAILURE, 0, "Couldn't allocate memory");
main_cheat->next = opt_x;
main_cheat->found = 0;
main_cheat->name = PLTs_initialized_by_here;
@@ -536,7 +536,7 @@
if (strcmp(xptr->name, PLTs_initialized_by_here) == 0) {
if (lte->ehdr.e_entry) {
add_library_symbol (
- elf_plt2addr (lte, (void*)(long)
+ opd2addr (lte, (void*)(long)
lte->ehdr.e_entry),
PLTs_initialized_by_here,
lib_tail, 1, 0);
Modified: ltrace/trunk/sysdeps/linux-gnu/ppc/arch.h
===================================================================
--- ltrace/trunk/sysdeps/linux-gnu/ppc/arch.h 2006-07-18 10:58:12 UTC (rev 50)
+++ ltrace/trunk/sysdeps/linux-gnu/ppc/arch.h 2006-07-18 11:06:26 UTC (rev 51)
@@ -7,6 +7,7 @@
#ifdef __powerpc64__ // Says 'ltrace' is 64 bits, says nothing about target.
#define LT_ELFCLASS2 ELFCLASS64
#define LT_ELF_MACHINE2 EM_PPC64
+#endif
#define PLT_REINITALISATION_BP "_start"
@@ -16,6 +17,3 @@
#if (PPC_NOP_LENGTH != BREAKPOINT_LENGTH)
#error "Length of the breakpoint value not equal to the length of a nop instruction"
#endif
-
-
-#endif
More information about the Ltrace-devel
mailing list