https://sourceware.org/bugzilla/show_bug.cgi?id=33552

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|NEW                         |RESOLVED

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Rainer Orth from comment #0)
> I've recently worked on a patch to always default to -mrelax-relocations=no
> on Solaris/x86.  For that, I meant to create a testcase showing that gas
> doesn't generate relax relocations even without -mrelax-relocations=no.
> 
> However, I found that this options doesn't live up to it claims: starting
> from
> testcase in gcc/configure.ac (HAVE_AS_IX86_GOT32X)
> 
>       .data
> bar:
>       .byte 1
>       .text
>       .global _start
> _start:
>        cmpl $0, bar@GOT
>        jmp *_start@GOT
> 
> 
> I found that the test sets HAVE_AS_IX86_GOT32X to 1 even though gas
> effectively
> defaults to -mrelax-relocations=no on Solaris/x86.
> 
> $ gas --32 -mrelax-relocations=no got32x.s -o got32x.o
> $ readelf -r got32x.o
> Relocation section '.rel.text' at offset 0xa8 contains 2 entries:
>  Offset     Info    Type            Sym.Value  Sym. Name
> 00000002  00000103 R_386_GOT32       00000000   bar
> 00000009  0000022b R_386_GOT32X      00000000   _start
>

Originally "jmp *_start@GOT" wasn't supported.  It was added with R_386_GOT32X
by

commit 02a866936de7e63ad4962ccba56c8cd05c231275
Author: H.J. Lu <[email protected]>
Date:   Thu Oct 22 04:46:51 2015 -0700

    Add R_386_GOT32X support to gas and ld

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to