[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/17795] Initial-Exec to Local-Exec may change the previous inst
From: |
ccoutant at google dot com |
Subject: |
[Bug gold/17795] Initial-Exec to Local-Exec may change the previous instruction |
Date: |
Mon, 05 Jan 2015 18:18:28 +0000 |
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.