[PowerPC64] Use 32-bit offset to load data

Maamoun TK requested to merge mamonet/nettle:ppc-got-32bit into master

ld instruction supports 16-bit offset, this means it can address up to 64K of GOT memory from a single base when loading data so only ~8,000 global variables are accessible in this way. While this works under the current circumstances, it's more safe to use wider offset to allow more variables to be accessed. This patch uses 32-bit offset to support medium or large code model with a maximum addressing reach of 4 GB. While this patch inserts additional instruction to load data from memory, the linker will optimize out the first instruction when possible by override it with nop instruction.

Merge request reports