summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2018-05-08 15:34:06 +0000
committerSimon Atanasyan <simon@atanasyan.com>2018-05-08 15:34:06 +0000
commit05600506688bb40b08e3042f98da4d7a96fbd836 (patch)
treeda0932d5adeccb38d44b6dfe495e0552cad489f6 /llvm/tools/llvm-objcopy/llvm-objcopy.cpp
parentc7113cc9e4f13b28f9c943b0e2a62239e0f23106 (diff)
downloadbcm5719-llvm-05600506688bb40b08e3042f98da4d7a96fbd836.tar.gz
bcm5719-llvm-05600506688bb40b08e3042f98da4d7a96fbd836.zip
[ELF][MIPS] Fix calculation of GP relative relocations in case of relocatable output
Some MIPS relocations depend on "gp" value. By default, this value has 0x7ff0 offset from a .got section. But relocatable files produced by a compiler or a linker might redefine this default value and we have to use it for a calculation of the relocation result. When we generate EXE or DSO it's trivial. Generating a relocatable output is more difficult case because the linker does calculate relocations in this case and cannot store individual "gp" values used by each input object file. As a workaround we add the "gp" value to the relocation addend. This fixes https://llvm.org/pr31149 Differential revision: https://reviews.llvm.org/D45972 llvm-svn: 331772
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud