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 #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

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