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/70146] missed-optimization: i386 hidden references should use PC32 relocations instead of GOTOFF


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Andy Lutomirski from comment #3)
> I think a similar optimization could be applied to default-visibility
> references as well.  For example, gcc can generate things like this:
> 
> 	call	__x86.get_pc_thunk.ax
> 	addl	$_GLOBAL_OFFSET_TABLE_, %eax
> 	movl	foo@GOT(%eax), %eax
> 
> The addl is unnecessary.

Yes, GCC does it for MacOS.

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