[Ltrace-devel] PIE support
Petr Machata
pmachata at redhat.com
Thu Nov 30 15:18:00 CET 2006
Ian Wienand wrote:
> On Mon, Nov 27, 2006 at 08:31:47PM +0100, Petr Machata wrote:
>> Aha, that's not very surprising. I dind't touch ia64 yet. It's on my
>> todo though.
>
> yeah, I don't see move_breakpoint being called at all.
That's strange, I just took itanium machine to debug the problem, and it
just works! Even the testsuite passes.
# cat x.c
#include <stdio.h>
int main(void)
{
fprintf (stderr, "ahoj %s!%c", "svete", '\n');
return 0;
}
# gcc x.c -fpie -pie -o x-pie
# gcc x.c -o x-nopie
# file x-pie x-nopie
x-pie: ELF 64-bit LSB shared object, IA-64, version 1 (SYSV), not stripped
x-nopie: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), for
GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
# ./ltrace ./x-pie
__libc_start_main(0x2000000800011490, 1, 0x60000fffffffb958,
0x2000000800011480, 0x2000000800011470 <unfinished ...>
fprintf(0x20000008002ec2c0, 0x2000000800000fa0, 0x2000000800000fb0, 10,
0ahoj svete!
) = 12
+++ exited (status 0) +++
# ./ltrace ./x-nopie
__libc_start_main(0x4000000000000a50, 1, 0x60000fffffffb958,
0x4000000000000a40, 0x4000000000000a30 <unfinished ...>
fprintf(0x20000000002d82c0, 0x4000000000000a00, 0x4000000000000a10, 10,
0ahoj svete!
) = 12
+++ exited (status 0) +++
No idea what went wrong at your site. Could you send along copy of
ltrace -ddd log? And what distro is installed there? I was testing it
on RHEL-4, but new versions of toolchain tend to add interesting twists
to once working programs...
>
> -i
PM
More information about the Ltrace-devel
mailing list