summaryrefslogtreecommitdiff
path: root/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
AgeCommit message (Collapse)Author
2016-02-28Remove the old ELF linker.Rafael Espindola
I think it is clear by now that the new linker is viable. llvm-svn: 262158
2015-07-25[Mips] Remove redundant separate functions to calculate relocations. DoSimon Atanasyan
that inline. No functional changes. llvm-svn: 243210
2015-07-25[Mips] Remove duplicated code by joining the same functionsSimon Atanasyan
llvm-svn: 243209
2015-07-25[Mips] Do not sign-extend addends read from RELA relocation recordsSimon Atanasyan
llvm-svn: 243208
2015-07-21[Mips] Fix addend writing for R_MIPS_REL32 relocationSimon Atanasyan
llvm-svn: 242760
2015-07-21[Mips] Handle R_MIPS_JALR relocation to omptimize jalr/jr instructionsSimon Atanasyan
llvm-svn: 242759
2015-07-13[Mips] Support MIPS big-endian 32/64-bits targetsSimon Atanasyan
llvm-svn: 242014
2015-06-22[Mips] Support R_MICROMIPS_HI0_LO16 relocation handlingSimon Atanasyan
llvm-svn: 240268
2015-06-22[Mips] Support R_MICROMIPS_LITERAL relocation handlingSimon Atanasyan
llvm-svn: 240267
2015-06-22[Mips] Support R_MIPS_LITERAL relocation handlingSimon Atanasyan
llvm-svn: 240266
2015-06-22[Mips] Support R_MICROMIPS_SUB relocation handlingSimon Atanasyan
llvm-svn: 240265
2015-06-22[Mips] Support R_MICROMIPS_HIGHER / R_MICROMIPS_HIGHEST relocations handlingSimon Atanasyan
llvm-svn: 240260
2015-06-22[Mips] Support R_MIPS_HIGHER / R_MIPS_HIGHEST relocations handlingSimon Atanasyan
llvm-svn: 240259
2015-06-17[Mips] Write inline some more relocation calculationsSimon Atanasyan
No functional changes. llvm-svn: 239961
2015-06-17[Mips] Support R_MICROMIPS_GPREL16 / R_MICROMIPS_GPREL7_S2 relocations handlingSimon Atanasyan
llvm-svn: 239960
2015-06-17[Mips] Support R_MIPS_16 relocation handlingSimon Atanasyan
llvm-svn: 239959
2015-06-17[Mips] Do not use functions to calculate trivial relocationsSimon Atanasyan
No functional changes. llvm-svn: 239957
2015-06-13[Mips] Support R_MIPS_PC16 relocation handlingSimon Atanasyan
llvm-svn: 239677
2015-06-13[Mips] Use standard relocations R_MIPS_HI16/LO16 instead of custom variantsSimon Atanasyan
No functional changes. llvm-svn: 239676
2015-06-12[Mips] Handle TLS relocations in -static linking modeSimon Atanasyan
llvm-svn: 239615
2015-06-06[Mips] Factor out some bit manipulation code into separate routinesSimon Atanasyan
No functional changes. llvm-svn: 239226
2015-06-06[Mips] Check symbol alignment for some MIPS relocations.Simon Atanasyan
llvm-svn: 239225
2015-06-06[Mips] Perform an overflow checking for relocations resultsSimon Atanasyan
llvm-svn: 239224
2015-06-06[Mips] Rearrange relocation related cases in the `switch` operatorSimon Atanasyan
No functional changes. llvm-svn: 239223
2015-06-06[Mips] Use signed/unsigned types in relocation calculations consistentlySimon Atanasyan
No functional changes. llvm-svn: 239222
2015-06-06[Mips] Handle all grouped relocations in a uniform waySimon Atanasyan
No functional changes. llvm-svn: 239221
2015-04-20[Mips] Support R_MICROMIPS_PC18_S3/PC19_S2/PC21_S2/PC26_S2 relocations handlingSimon Atanasyan
llvm-svn: 235289
2015-04-20[Mips] Support R_MICROMIPS_GOT_DISP / PAGE / OFST relocations handlingSimon Atanasyan
llvm-svn: 235288
2015-04-15[Mips] Check `_gp_disp` symbol using a trivial string comparisonSimon Atanasyan
No functional changes. llvm-svn: 235030
2015-04-14ELF: Remove redundant namespace qualifiers.Rui Ueyama
llvm-svn: 234938
2015-04-14ELF: Split HeaderChunks.h to HeaderChunks.{h,cpp}.Rui Ueyama
llvm-svn: 234932
2015-04-14Define make_dynamic_error_code(const char *).Rui Ueyama
The function took either StringRef or Twine. Since string literals are ambiguous when resolving the overloading, many code calls used this function with explicit type conversion. That led awkward code like make_dynamic_error_code(Twine("Error occurred")). This patch adds a function definition for string literals, so that you can directly call the function with literals. llvm-svn: 234841
2015-04-14ELF: Define ELF{32,64}{LE,BE} types and use them everywhere.Rui Ueyama
llvm-svn: 234823
2015-04-13[Mips] Move `MipsTargetLayout` class to the separate headerSimon Atanasyan
llvm-svn: 234727
2015-04-13[Mips] Support R_MICROMIPS_GOT_HI/LO16 and R_MICROMIPS_CALL_HI/LO16 relocationsSimon Atanasyan
llvm-svn: 234726
2015-04-13[Mips] Support R_MIPS_CALL_HI16 / R_MIPS_CALL_LO16 relocations handlingSimon Atanasyan
llvm-svn: 234725
2015-04-13[Mips] Support R_MIPS_GOT_HI16 / R_MIPS_GOT_LO16 relocations handlingSimon Atanasyan
llvm-svn: 234724
2015-04-10[Mips] Support R_MIPS_EH relocation handlingSimon Atanasyan
The patch supports just the R_MIPS_EH relocation handling and does not implement full specification of compact exception tables for MIPS ABIs. llvm-svn: 234634
2015-04-10[Mips] Replace MipsTargetHandler member function getGP() by getGPAddr()Simon Atanasyan
When we call getGP() we need in fact _gp symbol address. Let's cache its value and return it directly from the new getGPAddr() function. llvm-svn: 234632
2015-04-10[Mips] Fix typo in the commentSimon Atanasyan
llvm-svn: 234630
2015-04-06[Mips] Remove redundant non-template MipsRelocationHandler classSimon Atanasyan
llvm-svn: 234155
2015-04-06[Mips] Replace MipsRelocationHandler::readAddend() by a regular functionSimon Atanasyan
The readAddend() does not depend on MipsRelocationHandler and should not be its member function. llvm-svn: 234154
2015-03-31ELF: Remove TargetHandler::getTargetLayout.Rui Ueyama
Only MIPS used that member function, and by removing the use of the function, I removed a static_cast. Seems like it's a win. llvm-svn: 233748
2015-03-31[Mips] Use llvm::make_uniqueSimon Atanasyan
No functional changes. llvm-svn: 233727
2015-03-30[Mips] Fix writing R_MIPS_REL32 relocation addendumSimon Atanasyan
If input relocation records have RELA format while output dynamic relocations have REL format the only way to transfer a dynamic relocation addendum is to save it into the location modified by the dynamic relocation. llvm-svn: 233532
2015-03-24[Mips] Support MIPS N64 relocation record formatSimon Atanasyan
N64 ABI relocation record r_info field in fact consists of five subfields: * r_sym - symbol index * r_ssym - special symbol * r_type3 - third relocation type * r_type2 - second relocation type * r_type - first relocation type Up to three these relocations applied one by one. The first relocation uses an addendum from the relocation record. Each subsequent relocation takes as its addend the result of the previous operation. Only the final operation actually modifies the location relocated. The first relocation uses as a reference symbol specified by the `r_sym` field. The third relocation assumes NULL symbol. The patch represents these data using LLD model and takes in account additional relocation types during a relocation calculation. Additional relocations do not introduce any new relations between two atoms and just specify operations need to be done during a relocation calculation. The first relocation type (`r_type`) stored in the `Reference::_kindValue`. The rest of relocations and `r_ssym` value are stored in the new `Reference::_tag` field "as-is". I decided to do not "decode" these data on the core LLD level to prevent pollution of the core LLD model by very target specific data. Also I have to override writing of relocation records in the `RelocationTable` class to convert MIPS N64 ABI relocation information from the `Reference` class back to the ELF relocation record. http://reviews.llvm.org/D8533 llvm-svn: 233057
2015-03-22[Mips] Pass type of relocation and addendum to the `calculateRelocation`Simon Atanasyan
separately This change reduce difference between the trunk and upcoming patch and simplify the future code review. No functional changes. llvm-svn: 232919
2015-03-19[Mips] Add comments to the relocation calculation functionsSimon Atanasyan
No functional changes. llvm-svn: 232761
2015-03-19[Mips] Implement R_MIPS_PCHI16 / R_MIPS_PCLO16 relocations handlingSimon Atanasyan
llvm-svn: 232757
2015-03-19[Mips] Implement R_MIPS_PC18_S3 relocation handlingSimon Atanasyan
llvm-svn: 232756