This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/81490] x86: Handling of symbol ranges for __seg_fs/__seg_gs


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

--- Comment #24 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Andy Lutomirski from comment #20)
> 
> Can someone elaborate on what the @GPREL suffix actually means?

"%seg:foo@GPREL" is used to address symbol, foo, relative to __gp. foo is
addressed by %seg + offset of foo relative to __gp.  Linker sets __gp to
the middle of GP section which contains definitions of symbols with GPREL
relocations.  Run-time should load address of __gp into segment register,
%seg before accessing foo via "%seg:foo@GPREL".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]