Skip to content
  1. Nov 05, 2016
    • Simon Atanasyan's avatar
      [ELF][MIPS] N32 ABI support · 9e0297b8
      Simon Atanasyan authored
      In short the patch introduces support for linking object file conform
      MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit
      pointer size.
      
      The most non-trivial requirement of this ABI is one more relocation
      packing format. N64 ABI puts multiple relocation type into the single
      relocation record. The N32 ABI uses series of successive relocations
      with the same offset for this purpose. In this patch, new function
      `mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to
      the N64 relocation so the rest of the code keep unchanged.
      
      For now, linker does not support series of relocations applied to sections
      without SHF_ALLOC bit. Probably later I will add the support or insert
      some sort of assert into the `relocateNonAlloc` routine to catch this
      case.
      
      [1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf
      
      Differential revision: https://reviews.llvm.org/D26298
      
      llvm-svn: 286052
      9e0297b8
  2. Oct 04, 2016
  3. Sep 29, 2016
  4. Sep 14, 2016
    • Rui Ueyama's avatar
      Simplify InputFile ownership management. · 38dbd3ee
      Rui Ueyama authored
      Previously, all input files were owned by the symbol table.
      Files were created at various places, such as the Driver, the lazy
      symbols, or the bitcode compiler, and the ownership of new files
      was transferred to the symbol table using std::unique_ptr.
      All input files were then free'd when the symbol table is freed
      which is on program exit.
      
      I think we don't have to transfer ownership just to free all
      instance at once on exit.
      
      In this patch, all instances are automatically collected to a
      vector and freed on exit. In this way, we no longer have to
      use std::unique_ptr.
      
      Differential Revision: https://reviews.llvm.org/D24493
      
      llvm-svn: 281425
      38dbd3ee
  5. Aug 12, 2016
  6. Aug 11, 2016
  7. Aug 10, 2016
    • Simon Atanasyan's avatar
      [ELF][MIPS] Take into account combination of EF_MIPS_ARCH and EF_MIPS_MACH... · 9ef1215c
      Simon Atanasyan authored
      [ELF][MIPS] Take into account combination of EF_MIPS_ARCH and EF_MIPS_MACH flags while checking ISA compatibility
      
      MIPS ISA encoded using two ELF flags: general architecture flag like
      EF_MIPS_ARCH_32, EF_MIPS_ARCH_64R6 etc and optional machine variant flag
      like EF_MIPS_MACH_4111, EF_MIPS_MACH_OCTEON3 etc. When we check
      compatibility between two input files and deduce ELF flags for generated
      output we need to take into account both of these flags.
      
      llvm-svn: 278230
      9ef1215c
  8. Aug 08, 2016
    • Rui Ueyama's avatar
      Refactor getMipsEFlags. · 31f32fa6
      Rui Ueyama authored
      Previously, we incrementally updated the reuslting flag as we check
      file flags, so it was not very clear who is updating what flags.
      This patch makes them pure functions -- that has no side effect and
      don't update arguments to improve readability.
      
      Now each function construct a patial result, and all resutls are then
      bitwise-OR'ed to construct the final result.
      
      This patch also creates a new file, Mips.cpp, to move all these
      MIPS functions to a separate file.
      
      Differential Revision: https://reviews.llvm.org/D23249
      
      llvm-svn: 278042
      31f32fa6
Loading