aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Path.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2017-03-20 21:03:43 +0000
committerSimon Atanasyan <simon@atanasyan.com>2017-03-20 21:03:43 +0000
commitd34a3631b272cce00301e70c89e651968e1a6588 (patch)
tree8575a3c78fdeaa39b5e40717eafa3d82f3ba4865 /llvm/lib/Support/Path.cpp
parenta7291b373063c992127d93358a76ab7b6d0a1e2e (diff)
downloadllvm-d34a3631b272cce00301e70c89e651968e1a6588.zip
llvm-d34a3631b272cce00301e70c89e651968e1a6588.tar.gz
llvm-d34a3631b272cce00301e70c89e651968e1a6588.tar.bz2
[ELF][MIPS] Calculate relocations agains _gp_disp / __gnu_local_gp using dedicated 'expressions'
The patch introduces two new relocations expressions R_MIPS_GOT_GP and R_MIPS_GOT_GP_PC. The first one represents a current value of `_gp` pointer and used to calculate relocations against the `__gnu_local_gp` symbol. The second one represents the offset between the beginning of the function and the `_gp` pointer's value. There are two motivations for introducing new expressions: - It's better to keep all non-trivial relocation calculations in the single place - `getRelocTargetVA` function. - Relocations against both `_gp_disp` and `__gnu_local_gp` symbols depend on the `_gp` value. It's a magical value points to the "middle" of GOT. Now all relocations use a common `_gp` value. But in fact, under some conditions each input file might require its own `_gp` value. I'm going to implement it in the future patches. So it's better to make `MipsGotSection` responsible for calculation of the `_gp` value. llvm-svn: 298306
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
0 files changed, 0 insertions, 0 deletions