https://sourceware.org/bugzilla/show_bug.cgi?id=17795

Cary Coutant <ccoutant at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Cary Coutant <ccoutant at google dot com> ---
As you pointed out, there is no good way to verify that the instruction we're
modifying is actually a movq or addq. Checking for the 0x4c prefix is about as
good as we can do, and beyond that we have to count on the compiler generating
ABI-conforming code (where by "ABI", I mean Ulrich's TLS paper). The GOTTPOFF
relocation must be applied to either a movq or addq instruction, and the
destination register must be RAX, so a REX prefix is always required. (It's not
clear in Ulrich's document whether it *must* be RAX, but I'd definitely expect
it to be a quadword register requiring a REX prefix.) Otherwise, the code is
not conforming to the ABI, and the linker optimization may break it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to