Skip to content
  1. Nov 08, 2016
  2. 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
  3. Nov 03, 2016
  4. Nov 02, 2016
  5. Nov 01, 2016
  6. Oct 27, 2016
  7. Oct 26, 2016
  8. Oct 25, 2016
    • Rafael Espindola's avatar
      Delete getSectionHdr. · 58139d17
      Rafael Espindola authored
      We were fairly inconsistent as to what information should be accessed
      with getSectionHdr and what information (like alignment) was stored
      elsewhere.
      
      Now all section info has a dedicated getter. The code is also a bit
      more compact.
      
      llvm-svn: 285079
      58139d17
  9. Oct 21, 2016
    • Simon Atanasyan's avatar
      [ELF][MIPS] Put local GOT entries accessed via a 16-bit index first · bed04bf1
      Simon Atanasyan authored
      Some MIPS relocations used to access GOT entries are able to manipulate
      16-bit index. The other ones like R_MIPS_CALL_HI16/LO16 can handle
      32-bit indexes. 16-bit relocations are generated by default. The 32-bit
      relocations are generated by -mxgot flag passed to compiler. Usually
      these relocation are not mixed in the same code but files like crt*.o
      contain 16-bit relocations so even if all "user's" code compiled with
      -mxgot flag a few 16-bit relocations might come to the linking phase.
      
      Now LLD does not differentiate local GOT entries accessed via a 16-bit
      and 32-bit indexes. That might lead to relocation's overflow if 16-bit
      entries are allocated to far from the beginning of the GOT.
      
      The patch introduces new "part" of MIPS GOT dedicated to the local GOT
      entries accessed by 32-bit relocations. That allows to put local GOT
      entries accessed via a 16-bit index first and escape relocation's overflow.
      
      Differential revision: https://reviews.llvm.org/D25833
      
      llvm-svn: 284809
      bed04bf1
  10. Oct 20, 2016
  11. Oct 06, 2016
  12. Sep 29, 2016
  13. Sep 23, 2016
    • Peter Smith's avatar
      [ARM] ARM TLS shouldn't use relaxations · fde6213f
      Peter Smith authored
      The ARM TLS relocations are placed on literal data and not the 
      code-sequence, it is therefore not possible to implement the relaxTls* 
      functions. This change updates handleMipsTlsRelocation() to
      handleNoRelaxTlsRelocation() and incorporates ARM as well as Mips.
      
      The ARM support in handleNoRelaxTlsRelocation() currently needs to ouput
      the module index dynamic relocation in all cases as it is relying on the 
      dynamic linker to set the module index in the got.
      
      Should address PR30218
      
      Differential Revision: https://reviews.llvm.org/D24827
      
      llvm-svn: 282250
      fde6213f
  14. Sep 12, 2016
  15. Sep 08, 2016
  16. Sep 07, 2016
  17. Sep 06, 2016
  18. Sep 01, 2016
  19. Aug 22, 2016
  20. Aug 19, 2016
  21. Aug 18, 2016
    • Petr Hosek's avatar
      [ELF] Improve error reporting for relocations · 4071b1ba
      Petr Hosek authored
      We should always include symbol name when reporting relocations
      error to simplify debugging of these issues. Without symbol names
      users have to manually investigate which of the libraries contain
      invalid relocations which can be cumbersome when linking multiple
      libraries.
      
      Differential Revision: https://reviews.llvm.org/D23690
      
      llvm-svn: 279162
      4071b1ba
  22. Jul 21, 2016
  23. Jul 20, 2016
    • Rafael Espindola's avatar
      Delete EhInputSection::getOffset. · 2197311c
      Rafael Espindola authored
      We no longer need it for relocations in .eh_frame.
      
      The only relocations that point to .eh_frame are the ones trying to
      find the output .eh_frame.
      
      This actually fixes a bug in the symbol value code. It was not
      handling -1 as an indicator for a piece not being included in the
      output.
      
      llvm-svn: 276175
      2197311c
    • Rafael Espindola's avatar
      Avoid use of uninitialized iterators. · 228d27c7
      Rafael Espindola authored
      llvm-svn: 276157
      228d27c7
    • Rafael Espindola's avatar
      Create thunks before regular relocation scan. · 0f7cedaa
      Rafael Espindola authored
      We will need to do something like this to support range extension
      thunks since that process is iterative.
      
      Doing this also has the advantage that when doing the regular
      relocation scan the offset in the output section is known and we can
      just store that. This reduces the number of times we have to run
      getOffset and I think will allow a more specialized .eh_frame
      representation.
      
      By itself this is already a performance win.
      
      firefox
        master 7.295045737
        patch  7.209466989 0.98826892235
      chromium
        master 4.531254468
        patch  4.509221804 0.995137623774
      chromium fast
        master 1.836928973
        patch  1.823805241 0.992855612714
      the gold plugin
        master 0.379768791
        patch  0.380043405 1.00072310839
      clang
        master 0.642698284
        patch  0.642215663 0.999249070657
      llvm-as
        master 0.036665467
        patch  0.036456225 0.994293213284
      the gold plugin fsds
        master 0.40395817
        patch  0.404384555 1.0010555177
      clang fsds
        master 0.722045545
        patch  0.720946135 0.998477367518
      llvm-as fsds
        master 0.03292646
        patch  0.032759965 0.994943428477
      scylla
        master 3.427376378
        patch  3.368316181 0.98276810292
      
      llvm-svn: 276146
      0f7cedaa
    • Rafael Espindola's avatar
      Use iterators to avoid dereferencing end(). · f53f4f5a
      Rafael Espindola authored
      Thanks to George Rimar for finding the problem.
      
      llvm-svn: 276144
      f53f4f5a
    • Rafael Espindola's avatar
      Avoid some binary searches. · 5b7a79f9
      Rafael Espindola authored
      In here we are iterating relocations in order, so we can do the same
      with the pieces of .eh_frame and avoid a binary search.
      
      The link times I got with this patch were:
      
      firefox
        master 7.22977811
        patch  7.141041442 0.987726225252
      chromium
        master 4.478966851
        patch  4.506602207 1.00617002914
      chromium fast
        master 1.894713371
        patch  1.866446889 0.98508139414
      the gold plugin
        master 0.386193907
        patch  0.382374918 0.990111213743
      clang
        master 0.654849589
        patch  0.647899815 0.989387220949
      llvm-as
        master 0.037212718
        patch  0.036858172 0.990472450843
      the gold plugin fsds
        master 0.410876711
        patch  0.407418613 0.991583611562
      clang fsds
        master 0.734623069
        patch  0.728237526 0.991307728726
      llvm-as fsds
        master 0.033446197
        patch  0.03302833 0.987506292569
      scylla
        master 3.38134402
        patch  3.414188846 1.00971354166
      
      llvm-svn: 276108
      5b7a79f9
  24. Jul 17, 2016
    • Rui Ueyama's avatar
      Add a pointer to a source file to SymbolBody. · 434b5617
      Rui Ueyama authored
      Previously, each subclass of SymbolBody had a pointer to a source
      file from which it was created. So, there was no single way to get
      a source file for a symbol. We had getSourceFile<ELFT>(), but the
      function was a bit inconvenient as it's a template.
      
      This patch makes SymbolBody have a pointer to a source file.
      If a symbol is not created from a file, the pointer has a nullptr.
      
      llvm-svn: 275701
      434b5617
  25. Jul 08, 2016
    • Peter Smith's avatar
      Recommit R274836 Add Thunk support framework for ARM and Mips · fb05cd99
      Peter Smith authored
      The TinyPtrVector of const Thunk<ELFT>* in InputSections.h can cause 
      build failures on certain compiler/library combinations when Thunk<ELFT> 
      is not a complete type or is an abstract class. Fixed by making Thunk<ELFT>
      non Abstract.
      
      type or is an abstract class 
      
      llvm-svn: 274863
      fb05cd99
Loading