[Ltrace-devel] PIE support

Ian Wienand ianw at gelato.unsw.edu.au
Wed Nov 29 01:25:56 CET 2006


On Mon, Nov 27, 2006 at 08:31:47PM +0100, Petr Machata wrote:
> > ianw at jj:/tmp$ gcc -pie -o pie pie.c
> ^^^ could you try to compile with `gcc -fpie -pie -o pie pie.c`?  Might
> be that...

Ahh, interesting.  Adding the -fpie does indeed make it look correct
again, and reading the manual for -pie (as I probably should have done
in the first place :) I see it's only a linker flag.

ianw at jj:~/programs/ltrace-svn/ltrace/trunk$ ./ltrace /tmp/pie
[pid 31085] __libc_start_main(0x800005fc, 1, 0xbfbcb284, 0x80000690, 0x80000640 <unfinished ...>
[pid 31085] puts(0x80000758, 0xbfbcb284, 0xbfbcb208, 0x800006a9, 0xbfbcb210pie
)                   = 4
[pid 31085] __cxa_finalize(0x8000186c, 0x8000184c, 0xbfbcb1c8, 0x8000074c, 10)                 = 0
[pid 31085] +++ exited (status 4) +++

> 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.

-i



More information about the Ltrace-devel mailing list