[lld] r227245 - [Mips] Remove unused function argument
Simon Atanasyan
simon at atanasyan.com
Tue Jan 27 13:11:17 PST 2015
Author: atanasyan
Date: Tue Jan 27 15:11:16 2015
New Revision: 227245
URL: http://llvm.org/viewvc/llvm-project?rev=227245&view=rev
Log:
[Mips] Remove unused function argument
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=227245&r1=227244&r2=227245&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Tue Jan 27 15:11:16 2015
@@ -95,9 +95,9 @@ static void relocGPRel16(uint32_t &ins,
/// \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<ELFT>:
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:
More information about the llvm-commits
mailing list