summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2015-09-16 13:36:24 +0000
committerSimon Atanasyan <simon@atanasyan.com>2015-09-16 13:36:24 +0000
commit49c67236f15f62dd808e61f3f31e6e53fdec50e7 (patch)
tree3951de62b93a32980831971572a8656575a1cf5a /lld/lib/ReaderWriter/ELF
parent9763490e4d6fd10d0c5e446025fd08c367b1a691 (diff)
downloadbcm5719-llvm-49c67236f15f62dd808e61f3f31e6e53fdec50e7.tar.gz
bcm5719-llvm-49c67236f15f62dd808e61f3f31e6e53fdec50e7.zip
[Mips] Do not show an error if R_MIPS_GPREL32 relocation has a non-local target
This matches GNU linker behaviour. llvm-svn: 247795
Diffstat (limited to 'lld/lib/ReaderWriter/ELF')
-rw-r--r--lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
index 0800218e033..b47c7d2210d 100644
--- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
+++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
@@ -915,16 +915,6 @@ make_reject_for_shared_lib_reloc_error(const ELFLinkingContext &ctx,
}
static std::error_code
-make_external_gprel32_reloc_error(const ELFLinkingContext &ctx,
- const DefinedAtom &atom,
- const Reference &ref) {
- return make_dynamic_error_code(
- "R_MIPS_GPREL32 (12) relocation cannot be used "
- "against external symbol " +
- ref.target()->name() + " in file " + atom.file().path());
-}
-
-static std::error_code
make_local_call16_reloc_error(const ELFLinkingContext &ctx,
const DefinedAtom &atom, const Reference &ref) {
return make_dynamic_error_code("R_MIPS_CALL16 (11) relocation cannot be used "
@@ -940,9 +930,6 @@ RelocationPass<ELFT>::validateRelocation(const DefinedAtom &atom,
if (!ref.target())
return std::error_code();
- if (ref.kindValue() == R_MIPS_GPREL32 && !isLocal(ref.target()))
- return make_external_gprel32_reloc_error(this->_ctx, atom, ref);
-
if (isCallReloc(ref.kindValue()) && isLocal(ref.target()))
return make_local_call16_reloc_error(this->_ctx, atom, ref);
OpenPOWER on IntegriCloud