This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49833] [x32] PIC doesn't work
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jul 2011 16:42:06 +0000
- Subject: [Bug target/49833] [x32] PIC doesn't work
- Auto-submitted: auto-generated
- References: <bug-49833-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49833
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-25 16:41:36 UTC ---
(In reply to comment #7)
> (In reply to comment #1)
> > X32 dynamic linker is miscompiled:
>
> BTW: These two functions look the same to me.
>
> "lea (%rsi,%rdx,1),%edx" is the same as "add %esi,%edx".
>
> Can you please post the values of %rsi and %rdx before the insn and %rdx and
> %r13d after the insn?
>
> The %rdx value you posted was from "mov -0xc(%rdx),%edx"
Working ld.so sets EDX properly with:
0x0011470a <+922>: lea (%rdx,%rdx,2),%edx
0x0011470d <+925>: lea (%rcx,%rdx,4),%eax
0x00114710 <+928>: cmp %eax,%ecx
0x00114712 <+930>: mov %eax,%ebx
0x00114714 <+932>: jae 0x11475b <_dl_start+1003>
0x00114716 <+934>: cmpb $0x8,0x4(%r8)
0x0011471b <+939>: mov (%r8),%edx
Bad ld.so sets EDX with
0x001147ca <+922>: lea (%rdx,%rdx,2),%eax
0x001147cd <+925>: lea (%rcx,%rax,4),%eax
0x001147d0 <+928>: cmp %eax,%ecx
0x001147d2 <+930>: mov %eax,%ebx
0x001147d4 <+932>: jae 0x11481c <_dl_start+1004>
0x001147d6 <+934>: cmpb $0x8,0x4(%r8)
0x001147db <+939>: mov (%r8),%eax
0x001147de <+942>: jne 0x1148f1 <_dl_start+1217>
0x001147e4 <+948>: lea 0xc(%r8),%esi
0x001147e8 <+952>: lea 0x0(%r13,%rax,1),%edx