[Bug target/63842] x86-64 large PIC model may load the GOT base into the wrong register

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Nov 12 23:41:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63842

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
The proper code sequence should be

pushq %r15
load GOT base into %r15
load address of puts PLT entry into %rdx
call *(%rdx)
popq %r15

That is similar to 32-bit.



More information about the Gcc-bugs mailing list