[MIPS] Add GOT right below the text section
Make sure that GOT is close to the text section, so the function can reach
it easily. This is important for MIPS64 for which there is an assumption
that GOT can be reached if 32-bit value is added to $t9 (the start of the
function for PIC). The MIPS64 code looks like this:
// lui $v0, %hi(%neg(%gp_rel(fname)))
// daddu $v1, $v0, $t9
// daddiu $globalbasereg, $v1, %lo(%neg(%gp_rel(fname)))
This patch prevents possible issue in which a function could not reach GOT.
Change-Id: I024f1f9483ffcd312bb6fcbc61145a171e7096e9
3 files changed