From: Simon Atanasyan Date: Tue, 27 Jan 2015 21:11:16 +0000 (+0000) Subject: [Mips] Remove unused function argument X-Git-Tag: llvmorg-3.7.0-rc1~13916 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b95af6249314e0e963646c927db044bbfb0f745;p=platform%2Fupstream%2Fllvm.git [Mips] Remove unused function argument No functional changes. llvm-svn: 227245 --- diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp index 68ecd23..7b479ec 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp @@ -95,9 +95,9 @@ static void relocGPRel16(uint32_t &ins, uint64_t S, int64_t A, uint64_t GP) { /// \brief R_MIPS_GPREL32 /// local: rel32 A + S + GP0 - GP (truncate) -static void relocGPRel32(uint32_t &ins, uint64_t P, uint64_t S, int64_t A, - uint64_t GP) { - int32_t result = A + S + 0 - GP; +static void relocGPRel32(uint32_t &ins, uint64_t S, int64_t A, uint64_t GP) { + // We added GP0 to addendum for a local symbol during a Relocation pass. + int32_t result = A + S - GP; applyReloc(ins, result, 0xffffffff); } @@ -334,7 +334,7 @@ std::error_code RelocationHandler::applyRelocation( relocGPRel16(ins, targetVAddress, ref.addend(), gpAddr); break; case R_MIPS_GPREL32: - relocGPRel32(ins, relocVAddress, targetVAddress, ref.addend(), gpAddr); + relocGPRel32(ins, targetVAddress, ref.addend(), gpAddr); break; case R_MIPS_JALR: case R_MICROMIPS_JALR: