[Bug target/91766] -fvisibility=hidden during -fpic still uses GOT indirection on arm64

wdijkstr at arm dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 14 10:32:00 GMT 2019


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

Wilco <wdijkstr at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wdijkstr at arm dot com

--- Comment #4 from Wilco <wdijkstr at arm dot com> ---
(In reply to martin krastev from comment #3)
> So it appears to be a clash between -fcommon and -fvisibility=hidden during
> -fpic -- passing either -fno-common or -fno-pic drops the GOT indirection.
> And explicitly hiding the symbol obviously solves it. But the crux of the
> issue, IMO, is a multi-platform one -- that behavior deviates on gcc-8.2
> from platform to platform. On amd64 it suffices to -fvisibility=hidden to
> stop GOT detours, whereas on aarch64 it's -fvisibility=hidden -fno-common.
> As a result aarch64 performance gets penalized in unsuspecting multi-plats.

-fno-common should really become the default, -fcommon causes way too many
issues.


More information about the Gcc-bugs mailing list