public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [x32] Allow R_X86_64_64
@ 2011-08-01 22:16 H.J. Lu
  2011-08-12  4:37 ` H.J. Lu
  0 siblings, 1 reply; 12+ messages in thread
From: H.J. Lu @ 2011-08-01 22:16 UTC (permalink / raw)
  To: x32-abi, GCC Development, Binutils

Hi,

It turns out that x32 needs R_X86_64_64.  One major reason is
the displacement range of x32 is -2G to +2G.  It isn't a problem
for compiler since only small model is required for x32.

However, to address 0 to 4G directly in assembly code, we have
to use R_X86_64_64 with movabs.  I am checking the follow patch
into x32 psABI to allow R_X86_64_64.


-- 
H.J.
diff --git a/object-files.tex b/object-files.tex
index 3c9b9c6..7f0fd14 100644
--- a/object-files.tex
+++ b/object-files.tex
@@ -451,7 +451,7 @@ or \texttt{Elf32_Rel} relocation.
       \multicolumn{1}{c}{Calculation} \\
       \hline
       \texttt{R_X86_64_NONE}  & 0 & none & none \\
-      \texttt{R_X86_64_64} $^\dagger$ & 1 & \textit{word64} & \texttt{S + A} \\
+      \texttt{R_X86_64_64} & 1 & \textit{word64} & \texttt{S + A} \\
       \texttt{R_X86_64_PC32}  & 2 & \textit{word32} & \texttt{S + A - P} \\
       \texttt{R_X86_64_GOT32} & 3 & \textit{word32} & \texttt{G + A} \\
       \texttt{R_X86_64_PLT32} & 4 & \textit{word32} & \texttt{L + A - P} \\

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-08-15  6:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 22:16 [x32] Allow R_X86_64_64 H.J. Lu
2011-08-12  4:37 ` H.J. Lu
2011-08-12  7:30   ` Jan Beulich
2011-08-12 12:10     ` H.J. Lu
2011-08-12 13:16       ` Jan Beulich
2011-08-12 13:22         ` H.J. Lu
2011-08-12 13:58           ` Jan Beulich
2011-08-12 14:03             ` H.J. Lu
     [not found]               ` <4E4557DB0200007800051054@nat28.tlf.novell.com>
     [not found]                 ` <CAMe9rOrTw_R2U+9HeNY6iGhd6RD6ADG1Z9tjP8GyXGevnqSsQg@mail.gmail.com>
     [not found]                   ` <4E4560370200007800051095@nat28.tlf.novell.com>
2011-08-12 15:52                     ` H.J. Lu
2011-08-12 17:53                       ` H.J. Lu
2011-08-12 19:59                         ` H.J. Lu
2011-08-15  6:29                         ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).