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

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Rainer Orth from comment #10)
>
>  check:
>       subq    $8, %rsp
>       call    *get_func@GOTPCREL(%rip)
> -     cmpq    %rax, func_p(%rip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is from Linux which generates
R_X86_64_COPY
because:

#define HAVE_LD_PIE_COPYRELOC 1

With -mno-direct-extern-access, Linux also uses

movq    func_p@GOTPCREL(%rip), %rdx

> +     movq    func_p@GOTPCREL(%rip), %rdx
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is from Solaris.
> +     cmpq    %rax, (%rdx)
> 
> So gcc generates different code in this case.  No idea why, though.

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

Reply via email to