summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2016-10-21 07:22:30 +0000
committerSimon Atanasyan <simon@atanasyan.com>2016-10-21 07:22:30 +0000
commitbed04bf1df9d442f4a8e4d914d0dcd9155f2b931 (patch)
tree57eed9ee55e416965099b4be23be081c3a8f03aa /clang/lib/Sema/SemaExpr.cpp
parentc1db0db8647110c89924e6a29afe6455ed61a2a5 (diff)
downloadbcm5719-llvm-bed04bf1df9d442f4a8e4d914d0dcd9155f2b931.tar.gz
bcm5719-llvm-bed04bf1df9d442f4a8e4d914d0dcd9155f2b931.zip
[ELF][MIPS] Put local GOT entries accessed via a 16-bit index first
Some MIPS relocations used to access GOT entries are able to manipulate 16-bit index. The other ones like R_MIPS_CALL_HI16/LO16 can handle 32-bit indexes. 16-bit relocations are generated by default. The 32-bit relocations are generated by -mxgot flag passed to compiler. Usually these relocation are not mixed in the same code but files like crt*.o contain 16-bit relocations so even if all "user's" code compiled with -mxgot flag a few 16-bit relocations might come to the linking phase. Now LLD does not differentiate local GOT entries accessed via a 16-bit and 32-bit indexes. That might lead to relocation's overflow if 16-bit entries are allocated to far from the beginning of the GOT. The patch introduces new "part" of MIPS GOT dedicated to the local GOT entries accessed by 32-bit relocations. That allows to put local GOT entries accessed via a 16-bit index first and escape relocation's overflow. Differential revision: https://reviews.llvm.org/D25833 llvm-svn: 284809
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud