Age | Commit message (Collapse) | Author | Files | Lines |
|
- The reason being that this way, all of the code is exposed all the
time, which should make future refactoring easier. There's nothing
that needs hiding, no system-specific constants or such.
|
|
|
|
- One bug was in a function that returned a small structure and whose
first argument was a pointer that pointed to stack. The old code
assumed that meant that the structure was returned by implicit
reference instead of in registers.
- Another was in passing large HFA's (larger than 8 elements) in
arguments, and in returning HFA's.
|
|
|
|
Compilation on PPC32 fails because STACK_FRAME_OVERHEAD is never defined
in arch.h.
Define it to 112 on that platform to restore the same behaviour as
before commit eea4ad2cce289753aaa35b4e0258a76d8f8f367c.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
|
|
Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com>
Add support for ppc64le proc and ELF ABIv2.
Provides support for irelative and wchar
|
|
Include stdio.h in files that use fprintf()
Signed-off-by: dann frazier <dannf@debian.org>
|
|
aarch64's fetch.c uses the uintptr_t typedef defined by stdint.h without
including it. This doesn't currently cause a build failure because stdint.h
is indirectly included via proc.h.
Signed-off-by: dann frazier <dannf@debian.org>
|
|
- IFUNC support is not implemented, the rest works well. The only
other failure is in wide char functions, and that occurs on x86_64
as well.
|
|
In prelinked binaries, ltrace has to unprelinks PLT slots in order to
catch calls done through PLT. This makes the calls done through these
slots invalid, because the special first PLT slot is not initialized,
and dynamic linker SIGSEGVs because of this. Ltrace relies on
arranging breakpoints such that the dynamic linker is not actually
entered, and moves PC around itself to simulate the effects of a call
through PLT.
Originally, arch_elf_add_plt_entry was called only for symbols that
were actually traced. Later this was changed and it's now called for
all PLT entries, and the resulting candidate list is filtered
afterwards. This gives backends a chance to rename the symbol, as is
useful with IRELATIVE PLT calls, where symbol name may not be
available at all. But the PPC backend was never updated to reflect
this, and unresolved all symbols for which arch_elf_add_plt_entry was
called, thus rendering _all_ PLT slots invalid, even those that
weren't later procted by breakpoints. Thus calls done through any
untraced slots failed.
This patch fixes this problem by deferring the unprelinking of PLT
slots into the on_install hook of breakpoints.
|
|
|
|
GCC 4.4.7 isn't smart enough to realize own_libsym will always be zero
when it sees the goto done which might jump over the initialization of
libsym. And so will produce a warning like:
cc1: warnings being treated as errors
trace.c: In function ‘ifunc_ret_hit’:
trace.c:1433: error: ‘libsym’ may be used uninitialized in this function
|
|
In order to avoid single-stepping through large portions of the
dynamic linker, ltrace remembers at which address the instruction that
resolved a PLT slot is. It then puts a breakpoint to this address so
that it can fast-forward to that address next time it needs to catch a
PLT slot being resolved.
When a process is cloned, the pointer to this breakpoint is simply
copied over to the new process, instead of being looked up in the new
process structures. This patches fixes this.
|
|
|
|
This was caught by system_call_params.exp test case:
exe->mount("source", "target", "filesystemtype", 0, nil <unfinished ...>
mount@SYS("", "target", "filesystemtype", 0, nil) = -2
<... mount resumed> = -1
Note how the first parameter disappears--r2 now holds syscall number
(21 in this case), and the original value is stored in orig_gpr2 in
save area.
|
|
- In general they are. But IRELATIVE relocations are sorted to come
last, and PLT entries are not sorted accordingly.
|
|
|
|
- This was broken several commits back by removing pltrel from
struct ltelf.
|
|
- That's the customary location for backend hooks.
|
|
|
|
|
|
|
|
|