Skip to content
  1. 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
    • Peter Smith's avatar
      Revert R274836 Add Thunk support framework for ARM and Mips · eeb82744
      Peter Smith authored
      This seems to be causing a buildbot failure on lld-x86_64-freebsd. Will
      reproduce locally and fix. 
      
      llvm-svn: 274841
      eeb82744
    • Peter Smith's avatar
      Add Thunk support framework for ARM and Mips · de01b98a
      Peter Smith authored
          
          Generalise the Mips LA25 Thunk code and implement ARM and Thumb
          interworking Thunks.
          
          - Introduce a new module Thunks.cpp to store the Target Specific Thunk
            implementations.
          - DefinedRegular and Shared have a ThunkData field to record Thunk.
          - A Target can have more than one type of Thunk.
          - Support PC-relative calls to Thunks.
          - Support Thunks to PLT entries.
          - Existing Mips LA25 Thunk code integrated.
          - Support for ARMv7A interworking Thunks.
          
          Limitations:
          - Only one Thunk per SymbolBody, this is sufficient for all currently
            implemented Thunks.
          - ARM thunks assume presence of V6T2 MOVT and MOVW instructions.
      
          Differential revision: http://reviews.llvm.org/D21891
      
      llvm-svn: 274836
      de01b98a
  2. Jun 23, 2016
    • Simon Atanasyan's avatar
      [ELF][MIPS] Support MIPS TLS relocations · 002e2447
      Simon Atanasyan authored
      The patch adds one more partition to the MIPS GOT. This time it is for
      TLS related GOT entries. Such entries are located after 'local' and 'global'
      ones. We cannot get a final offset for these entries at the time of
      creation because we do not know size of 'local' and 'global' partitions.
      So we have to adjust the offset later using `getMipsTlsOffset()` method.
      
      All MIPS TLS relocations which need GOT entries operates MIPS style GOT
      offset - 'offset from the GOT's beginning' - MipsGPOffset constant. That
      is why I add new types of relocation expressions.
      
      One more difference from othe ABIs is that the MIPS ABI does not support
      any TLS relocation relaxations. I decided to make a separate function
      `handleMipsTlsRelocation` and put MIPS TLS relocation handling code
      there. It is similar to `handleTlsRelocation` routine and duplicates its
      code. But it allows to make the code cleaner and prevent pollution of
      the `handleTlsRelocation` by MIPS 'if' statements.
      
      Differential Revision: http://reviews.llvm.org/D21606
      
      llvm-svn: 273569
      002e2447
    • Rui Ueyama's avatar
      Fix a bug that MIPS thunks can overwrite other section contents. · 809d8e2d
      Rui Ueyama authored
      Peter Smith found while trying to support thunk creation for ARM that
      LLD sometimes creates broken thunks for MIPS. The cause of the bug is
      that we assign file offsets to input sections too early. We need to
      create all sections and then assign section offsets because appending
      thunks changes file offsets for all following sections.
      
      This patch separates the pass to assign file offsets from thunk
      creation pass. This effectively reverts r265673.
      
      Differential Revision: http://reviews.llvm.org/D21598
      
      llvm-svn: 273532
      809d8e2d
  3. Jun 22, 2016
    • Rui Ueyama's avatar
      Do not scan relocations twice for MIPS. · d2ada2ea
      Rui Ueyama authored
      Previously, relocations for MIPS were scanned twice; once in regular
      scanRelocs() and the other is in scanRelocsForThunks. In the former
      function, we computed types of relocations and skipped R_THUNK relocations.
      In the latter function, we computed the same value again and skipped
      all but R_THUNK relocations. It was wasteful. This patch fixes that.
      Now R_THUNK relocations are handled in the regular manner.
      
      llvm-svn: 273346
      d2ada2ea
  4. Jun 20, 2016
  5. Jun 19, 2016
    • Simon Atanasyan's avatar
      [ELF][MIPS] Support GOT entries for non-preemptible symbols with different addends · 4132511c
      Simon Atanasyan authored
      There are two motivations for this patch. The first one is a preparation
      for support MIPS TLS relocations. It might sound like a joke but for GOT
      entries related to TLS relocations MIPS ABI uses almost regular approach
      with creation of dynamic relocations for each GOT enty etc. But we need
      to separate these 'regular' TLS related entries from MIPS specific local
      and global parts of GOT. ABI declare simple solution - all TLS related
      entries allocated at the end of GOT after local/global parts. The second
      motivation it to support GOT relocations for non-preemptible symbols
      with addends. If we have more than one GOT relocations against symbol S
      with different addends we need to create GOT entries for each unique
      Symbol/Addend pairs.
      
      So we store all MIPS GOT entries in separate containers. For non-preemptible
      symbols we have to maintain two data structures. The first one is MipsLocal
      vector. Each entry corresponds to the GOT entry from the 'local' part
      of the GOT contains the symbol's address plus addend. The second one
      is MipsLocalMap. It is a map from Symbol/Addend pair to the GOT index.
      
      Differential Revision: http://reviews.llvm.org/D21297
      
      llvm-svn: 273127
      4132511c
  6. Jun 17, 2016
  7. Jun 10, 2016
  8. Jun 09, 2016
  9. Jun 08, 2016
  10. Jun 05, 2016
  11. Jun 04, 2016
  12. Jun 02, 2016
    • Rafael Espindola's avatar
      Start adding tlsdesc support for aarch64. · e37d13b9
      Rafael Espindola authored
      This is mostly extracted from http://reviews.llvm.org/D18960.
      
      The general idea for tlsdesc is that the two GD got entries are used
      for a function pointer and its argument. The dynamic linker sets
      both. In the non-dlopen case the dynamic linker sets the function to
      the identity and the argument to the offset in the tls block.
      
      All that the static linker has to do in the non-dlopen case is
      relocate the code to point to the got entries and create a dynamic
      relocation.
      
      The dlopen case is more complicated, but can be implemented in another patch.
      
      llvm-svn: 271569
      e37d13b9
  13. Jun 01, 2016
  14. May 28, 2016
  15. May 26, 2016
  16. May 25, 2016
  17. May 24, 2016
Loading