This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81490] x86: Handling of symbol ranges for __seg_fs/__seg_gs
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Aug 2017 22:43:06 +0000
- Subject: [Bug target/81490] x86: Handling of symbol ranges for __seg_fs/__seg_gs
- Auto-submitted: auto-generated
- References: <bug-81490-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81490
--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 41920
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41920&action=edit
A binutils patch
This binutils patch adds R_X86_64_GPREL to assembler and linker. It
supports:
.text
.globl get_foo
get_foo:
movl %gs:foo@GPREL, %eax // GS + offset of foo relative to __gp.
ret
.data
.globl foo_gprel
foo_gprel:
.long foo@GPREL // offset of foo relative to __gp.
.section .gpdata,"aw",@progbits
.globl foo
foo:
.long 0x12345678