Hi Andrew, > I thought that was changed not to use the GOT on purpose. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63874 > > That is if the symbol is not declared in the TU, then using the GOT is > correct thing to do. > Is the testcase gcc.target/aarch64/pr63874.c still working or is not > testing the correct thing?
That PR was about weak definitions, not references. The exact same sequence is emitted whether we use the GOT or literal (ADRP+LDR), hence there is no point in treating the non-PIC case differently. Cheers, Wilco