https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85801
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> --- On May 16, 2018 5:07:57 PM GMT+02:00, "rearnsha at gcc dot gnu.org" <gcc-bugzi...@gcc.gnu.org> wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85801 > >--- Comment #5 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- >> ld: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `progname' >which may bind externally can not be used when making a shared object; >recompile with -fPIC > >So this is the start of the problem. Changing the behaviour to remove >this >would involve disabling section anchors for all code (rather than just >PIC): we >wouldn't know when a symbol might be pre-empted during linking. > >I don't think we want to fix this, even if we could... there would be >a large >performance penalty for lazy build systems. > >That this works on X86 is not enough, IMO. x86 doesn't use section >anchors. Can't we decide that per symbol? Or somehow force the dynamic linker to use the program symbol?