This is based on D54720 by Sean Fertile.
When accessing a global symbol which is not defined in the translation unit,
compilers will load the address from the toc entry.
If the symbol is defined, non-preemptable, and addressable with 32-bit
signed offset from the toc pointer, the address can be computed
addis 3, 2, .LC0@toc@ha # R_PPC64_TOC16_HA
ld 3, .LC0@toc@l(3) # R_PPC64_TOC16_LO_DS
.LC0: .tc aGlobal[TC],aGlobal
can be relaxed to
addis 3,2,offset_ha # or nop
addi 3,3,offset_l # or addi 3,2,offset
We can delete the test ppc64-got-indirect.s as its purpose is covered by
newly added ppc64-toc-relax.s and ppc64-toc-relax-constants.s