Skip to content
  1. Dec 18, 2016
    • Rui Ueyama's avatar
      Remove lld/Support/Memory.h. · 9381eb10
      Rui Ueyama authored
      I thought for a while about how to remove it, but it looks like we
      can just copy the file for now. Of course I'm not happy about that,
      but it's just less than 50 lines of code, and we already have
      duplicate code in Error.h and some other places. I want to solve
      them all at once later.
      
      Differential Revision: https://reviews.llvm.org/D27819
      
      llvm-svn: 290062
      9381eb10
  2. Dec 12, 2016
    • Saleem Abdulrasool's avatar
      build: add support for standalone lld build · f1af26dd
      Saleem Abdulrasool authored
      Enable building lld as a standalone project. This is motivated by the desire to
      package lld for inclusion in a linux distribution. This allows building lld
      against an existing paired llvm installation. Now that lld is usable on x86_64,
      it makes sense to revive this configuration to allow distributions to package
      it.
      
      llvm-svn: 289421
      f1af26dd
  3. Dec 08, 2016
  4. Nov 20, 2016
  5. Nov 17, 2016
    • Chris Bieneman's avatar
      [CMake] NFC. Updating CMake dependency specifications · aeb30257
      Chris Bieneman authored
      This patch updates a couple places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.
      
      llvm-svn: 287205
      aeb30257
  6. Nov 01, 2016
    • Rui Ueyama's avatar
      Create SyntheticSections.cpp. · 6dc7fcbe
      Rui Ueyama authored
      We are going to have many more classes for linker-synthesized
      input sections, so it's worth to be added to a separate file
      than to the file for regular input sections.
      
      llvm-svn: 285740
      6dc7fcbe
  7. Oct 28, 2016
    • Rui Ueyama's avatar
      Consolidate BumpPtrAllocators. · 55518e7d
      Rui Ueyama authored
      Previously, we have a lot of BumpPtrAllocators, but all these
      allocators virtually have the same lifetime because they are
      not freed until the linker finishes its job. This patch aggregates
      them into a single allocator.
      
      Differential revision: https://reviews.llvm.org/D26042
      
      llvm-svn: 285452
      55518e7d
  8. Oct 27, 2016
  9. Oct 21, 2016
    • George Rimar's avatar
      [ELF] Add DebugInfoDWARF dependency · 032fa656
      George Rimar authored
      rL284708 introduces a link error when building with BUILD_SHARED_LIBS:
      
      undefined reference to `llvm::DWARFContext::parseCompileUnits()'
      undefined reference to `llvm::DWARFContextInMemory::DWARFContextInMemory(
                                  llvm::object::ObjectFile const&,
                                  llvm::LoadedObjectInfo const*)'
      The functions are available in libDebugInfoDWARF, from llvm.
      
      Patch by Visoiu Mistrih Francis
      
      Differential revision: https://reviews.llvm.org/D25843
      
      llvm-svn: 284810
      032fa656
  10. Oct 20, 2016
    • George Rimar's avatar
      [ELF] - Partial support of --gdb-index command line option (Part 1). · 58fa5243
      George Rimar authored
      In this patch partial gdb_index section is created. 
      For costructing the .gdb_index section 6 steps should be performed (details are in
      SplitDebugInfo.cpp file header), this patch do first 3:
      
      Creates proper section header.
      Fills list of compilation units.
      Types CU list area is not supposed to be supported, so it is ignored and therefore
      can be treated as implemented either.
      
      Differential revision: https://reviews.llvm.org/D24706
      
      llvm-svn: 284708
      58fa5243
  11. Sep 10, 2016
  12. Sep 06, 2016
  13. 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
  14. Jul 26, 2016
    • Peter Collingbourne's avatar
      COFF: Implement /linkrepro flag. · feee2103
      Peter Collingbourne authored
      This flag is implemented similarly to --reproduce in the ELF linker.
      
      This patch implements /linkrepro by moving the cpio writer and associated
      utility functions to lldCore, and using that implementation in both linkers.
      
      One COFF-specific detail is that we store the object file from which the
      resource files were created in our reproducer, rather than the resource
      files themselves. This allows the reproducer to be used on non-Windows
      systems for example.
      
      Differential Revision: https://reviews.llvm.org/D22418
      
      llvm-svn: 276719
      feee2103
  15. 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
  16. Jun 29, 2016
  17. Jun 22, 2016
  18. May 24, 2016
  19. May 15, 2016
  20. Apr 22, 2016
    • Peter Collingbourne's avatar
      ELF: Implement basic support for --version-script. · 66ac1d61
      Peter Collingbourne authored
      This patch only implements support for version scripts of the form:
        { [ global: symbol1; symbol2; [...]; symbolN; ] local: *; };
      No wildcards are supported, other than for the local entry. Symbol versioning
      is also not supported.
      
      It works by introducing a new Symbol flag which tracks whether a symbol
      appears in the global section of a version script.
      
      This patch also simplifies the logic in SymbolBody::isPreemptible(), and
      teaches it to handle the case where symbols with default visibility in DSOs
      do not appear in the dynamic symbol table because of a version script.
      
      Fixes PR27482.
      
      Differential Revision: http://reviews.llvm.org/D19430
      
      llvm-svn: 267208
      66ac1d61
  21. Apr 18, 2016
  22. Apr 17, 2016
  23. Apr 13, 2016
    • Adhemerval Zanella's avatar
      ELF: Implement --dynamic-list · 9df07207
      Adhemerval Zanella authored
      This patch implements the --dynamic-list option, which adds a list of
      global symbol that either should not be bounded by default definition
      when creating shared libraries, or add in dynamic symbol table in the
      case of creating executables.
      
      The patch modifies the ScriptParserBase class to use a list of Token
      instead of StringRef, which contains information if the token is a
      quoted or unquoted strings. It is used to use a faster search for
      exact match symbol name.
      
      The input file follow a similar format of linker script with some
      simplifications (it does not have scope or node names). It leads
      to a simplified parser define in DynamicList.{cpp,h}.
      
      Different from ld/gold neither glob pattern nor mangled names
      (extern 'C++') are currently supported.
      
      llvm-svn: 266227
      9df07207
  24. Apr 06, 2016
    • Adhemerval Zanella's avatar
      [lld] [ELF] Add ScriptParserBase class · e77b5bf6
      Adhemerval Zanella authored
      This patch add a base script tokenizer class to decouple parsing from
      linker script handling.  The idea is to use this base class on dynamic
      list parsing (--dynamic-list option). No functionality added.
      
      llvm-svn: 265600
      e77b5bf6
  25. Mar 30, 2016
  26. Mar 22, 2016
  27. Mar 18, 2016
  28. Mar 11, 2016
  29. Mar 09, 2016
  30. Mar 01, 2016
  31. Feb 28, 2016
    • Rui Ueyama's avatar
      Move functionality of UniversalDriver to the entry point file. · e7b33005
      Rui Ueyama authored
      UniversalDriver was used as a dispatcher to each platform-specific driver.
      It had its own Options.td file. It was not just too much to parse only a
      few options (we only want to parse -core, -flavor or argv[0]),
      but also interpreted arguments too early. For example, if you invoke lld as
      "lld -flavor gnu ... -help", then you'd get the UniversalDriver's help
      message instead of GnuDriver's. This patch eliminates the use of Options
      from the dispatcher.
      
      http://reviews.llvm.org/D17686
      
      llvm-svn: 262190
      e7b33005
    • Rafael Espindola's avatar
      Rename elf2 to elf. · e0df00b9
      Rafael Espindola authored
      llvm-svn: 262159
      e0df00b9
  32. Feb 25, 2016
    • Rui Ueyama's avatar
      ELF: Implement ICF. · 0b289529
      Rui Ueyama authored
      This patch implements the same algorithm as LLD/COFF's ICF. I'm
      not going to repeat the same description about how it works, so you
      want to read the comment in ICF.cpp in this patch if you want to know
      the details. This algorithm should be more powerful than the ICF
      algorithm implemented in GNU gold. It can even merge mutually-recursive
      functions (which is harder than one might think).
      
      ICF is a fairly effective size optimization. Here are some examples.
      
       LLD:   37.14 MB -> 35.80 MB (-3.6%)
       Clang: 59.41 MB -> 57.80 MB (-2.7%)
      
      The lacking feature is "safe" version of ICF. This merges all
      identical sections. That is not compatible with a C/C++ language
      requirement that two distinct functions must have distinct addresses.
      
      But as long as your program do not rely on the pointer equality
      (which is in many cases true), your program should work with the
      feature. LLD works fine for example.
      
      GNU gold implements so-called "safe ICF" that identifies functions
      that are safe to merge by heuristics -- for example, gold thinks
      that constructors are safe to merge because there is no way to
      take an address of a constructor in C++. We have a different idea
      which David Majnemer suggested that we add NOPs at beginning of
      merged functions so that two or more pointers can have distinct
      values. We can do whichever we want, but this patch does not
      include neither.
      
      http://reviews.llvm.org/D17529
      
      llvm-svn: 261912
      0b289529
  33. Jan 07, 2016
    • Pete Cooper's avatar
      Set the folder for libraries to 'lld libraries'. NFC. · f154b678
      Pete Cooper authored
      In a UI such as XCode, LLVM source files are in 'libraries' while clang
      files are in 'clang libraries'.
      
      This change moves the lld source to 'lld libraries' to make code browsing easier.
      
      It should be NFC as the build itself is still the same, just the structure in a
      UI differs.
      
      llvm-svn: 257001
      f154b678
  34. Oct 22, 2015
    • Rui Ueyama's avatar
      ELF2: Implement --gc-sections. · c4aaed92
      Rui Ueyama authored
      Section garbage collection is a feature to remove unused sections
      from outputs. Unused sections are sections that cannot be reachable
      from known GC-root symbols or sections. Naturally the feature is
      implemented as a mark-sweep garbage collector.
      
      In this patch, I added Live bit to InputSectionBase. If and only
      if Live bit is on, the section will be written to the output.
      Starting from GC-root symbols or sections, a new function, markLive(),
      visits all reachable sections and sets their Live bits. Writer then
      ignores sections whose Live bit is off, so that such sections are
      excluded from the output.
      
      This change has small negative impact on performance if you use
      the feature because making sections means more work. The time to
      link Clang changes from 0.356s to 0.386s, or +8%.
      
      It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes.
      That is 4.3% reduction.
      
      http://reviews.llvm.org/D13950
      
      llvm-svn: 251043
      c4aaed92
  35. Sep 30, 2015
Loading