[ELF][MIPS] Make _gp, _gp_disp, __gnu_local_gp global symbols
authorSimon Atanasyan <simon@atanasyan.com>
Thu, 8 Dec 2016 06:19:47 +0000 (06:19 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Thu, 8 Dec 2016 06:19:47 +0000 (06:19 +0000)
commit6a4eb75c46dc11578c4dd47db82c7a69a8f65839
tree9a50dbfc11005e8467a0eb307636cf528d9a7a83
parentf4257528e967dae1cf49328f2a8cfdc28815a2f3
[ELF][MIPS] Make _gp, _gp_disp, __gnu_local_gp global symbols

These MIPS specific symbols should be global because in general they can
have an arbitrary value. By default this value is a fixed offset from .got
section.

This patch adds more checks to the mips-gp-local.s test case but marks
it as XFAIL because LLD does not allow redefinition of absolute symbols
value by a linker script. This should be fixed by D27276.

Differential revision: https://reviews.llvm.org/D27524

llvm-svn: 289025
19 files changed:
lld/ELF/Relocations.cpp
lld/ELF/SymbolTable.cpp
lld/ELF/SymbolTable.h
lld/ELF/Symbols.h
lld/ELF/Target.cpp
lld/ELF/Writer.cpp
lld/test/ELF/basic-mips.s
lld/test/ELF/mips-64-disp.s
lld/test/ELF/mips-64-got.s
lld/test/ELF/mips-64-gprel-so.s
lld/test/ELF/mips-64-rels.s
lld/test/ELF/mips-got-relocs.s
lld/test/ELF/mips-gp-disp.s
lld/test/ELF/mips-gp-ext.s
lld/test/ELF/mips-gp-local.s
lld/test/ELF/mips-gprel32-relocs-gp0.s
lld/test/ELF/mips-gprel32-relocs.s
lld/test/ELF/mips-hilo-gp-disp.s
lld/test/ELF/mips-n32-rels.s