[Ltrace-devel] pmachata/revamp merged
Petr Machata
pmachata at redhat.com
Fri Aug 31 22:40:06 UTC 2012
Sedat Dilek <sedat.dilek at gmail.com> writes:
> None of the below GIT snapshot-tarballs compile fine.
>
> $ LC_ALL=C ls -l dl/ltrace*.tar.gz
> -rw-rw-r-- 1 wearefam wearefam 152631 Aug 30 23:13 dl/ltrace-1788f8a.tar.gz
> -rw-rw-r-- 1 wearefam wearefam 157863 Aug 30 21:51 dl/ltrace-5f30bc3.tar.gz
> -rw-rw-r-- 1 wearefam wearefam 152035 Aug 30 21:49 dl/ltrace-8a115b6.tar.gz
> -rw-rw-r-- 1 wearefam wearefam 176128 Aug 30 21:59 dl/ltrace-97b2084.tar.gz
> -rw-rw-r-- 1 wearefam wearefam 249936 Aug 30 17:36 dl/ltrace-fcf256c.tar.gz
Hmm, that might be due to the fact that more modern compilers or changes
in system header files cause the compilation failures. If those nits
are fixed, it might work. But I don't know whether Arnaud Patard
actually verified that the master branch works as indented when he
contributed the patches.
> "130-ltrace-mips.patch" was a merge-bomb of a MIPS patchset by Arnaud
> Patard (ex Mandrake/Mandriva).
I looked at this and Arnaud did actually contribute this as a patch
series. That "fix mips" commit was his as well, and part of the series.
> For ltrace >=0.6.0 GIT I added "autogen.sh" as configure-pre-cmds to
> ltrace.mk [2] (see file attachments).
>
> But all builds failed...
> "97b208405b (when threads branch was merged)" looked good after fixing
> some minor issues, but in the end I got frustrated last night.
The bugs from the compile log that you posted should hopefully be fixed
by the following patch:
diff --git a/sysdeps/linux-gnu/mipsel/plt.c b/sysdeps/linux-gnu/mipsel/plt.c
index 3ffaddf..7fe174f 100644
--- a/sysdeps/linux-gnu/mipsel/plt.c
+++ b/sysdeps/linux-gnu/mipsel/plt.c
@@ -1,9 +1,11 @@
-#include "debug.h"
+#include <error.h>
#include <gelf.h>
#include <sys/ptrace.h>
-#include <error.h>
-#include "proc.h"
+
#include "common.h"
+#include "debug.h"
+#include "proc.h"
+#include "library.h"
/**
\addtogroup mipsel
@@ -34,10 +36,12 @@
*/
GElf_Addr
-arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) {
- debug(1,"plt_addr %x ndx %#x",lte->pltgot_addr, ndx);
- return lte->pltgot_addr +
- sizeof(void *) * (lte->mips_local_gotno + (ndx - lte->mips_gotsym));
+arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela)
+{
+ debug(1,"plt_addr %zx ndx %#zx",lte->arch.pltgot_addr, ndx);
+ return lte->arch.pltgot_addr +
+ sizeof(void *) * (lte->arch.mips_local_gotno
+ + (ndx - lte->arch.mips_gotsym));
}
/**
\param proc The process to work on.
diff --git a/sysdeps/linux-gnu/mipsel/trace.c b/sysdeps/linux-gnu/mipsel/trace.c
index fffaf75..c55ff32 100644
--- a/sysdeps/linux-gnu/mipsel/trace.c
+++ b/sysdeps/linux-gnu/mipsel/trace.c
@@ -5,11 +5,14 @@
#include <signal.h>
#include <sys/ptrace.h>
#include <asm/ptrace.h>
-#include "debug.h"
-#include "proc.h"
+
+#include "backend.h"
#include "common.h"
+#include "debug.h"
#include "mipsel.h"
+#include "proc.h"
#include "type.h"
+
#if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR))
# define PTRACE_PEEKUSER PTRACE_PEEKUSR
#endif
--
1.7.6.5
> When seeing "Fix arch_plt_sym_val for m68k"... "plt.c" [3] in
> mipsel-arch is a bit different from the one of other archs and there
> is no ref to "pltgot_addr" in arch_plt_sym_val() (see file
> attachments).
That's my fault. I was doing some cleanups and moving purely back end
stuff to the respective back ends. I updated arch_elf_init, but failed
to notice arch_plt_sym_val needs updating, too. The above patch should
hopefully fix that.
Thank you,
PM
More information about the Ltrace-devel
mailing list