Skip to content
  1. Dec 20, 2016
    • Rui Ueyama's avatar
      Simplify type of Config->SymbolOrderingFile. · 31270311
      Rui Ueyama authored
      That variable was of type DenseMap<StringRef, unsigned>, but the
      unsigned numbers needed to be monotonicly increasing numbers because
      the implementation that used the variable depended on that fact.
      That was an implementation detail and shouldn't have leaked into Config.
      
      This patch simplifies its type to std::vector<StringRef>.
      
      llvm-svn: 290151
      31270311
  2. Dec 19, 2016
    • George Rimar's avatar
      [ELF] - Implemented --retain-symbols-file option · 2bb88ab5
      George Rimar authored
      --retain-symbols-file=filename
      Retain only the symbols listed in the file filename, discarding all others. 
      filename is simply a flat file, with one symbol name per line. This option 
      is especially useful in environments (such as VxWorks) where a large global 
      symbol table is accumulated gradually, to conserve run-time memory.
      
      Note: though documentation says "--retain-symbols-file does not discard 
      undefined symbols, or symbols needed for relocations.", both bfd and gold 
      do that, and this patch too, like testcase show.
      
      Differential revision: https://reviews.llvm.org/D27716
      
      llvm-svn: 290122
      2bb88ab5
    • Rui Ueyama's avatar
      Remove inappropriate use of CachedHashStringRef. · 8f687f71
      Rui Ueyama authored
      Use of CachedHashStringRef makes sense only when we reuse hash values.
      Sprinkling it to all DenseMap has no benefits and just complicates data types.
      Basically we shouldn't use CachedHashStringRef unless there is a strong
      reason to to do so.
      
      llvm-svn: 290076
      8f687f71
  3. Dec 08, 2016
    • Rafael Espindola's avatar
      Change the implementation of --dynamic-list to use linker script parsing. · d0ebd84c
      Rafael Espindola authored
      The feature is documented as
      -----------------------------
      The format of the dynamic list is the same as the version node
      without scope and node name.  See *note VERSION:: for more
      information.
      --------------------------------
      
      And indeed qt uses a dynamic list with an 'extern "C++"' in it. With
      this patch we support that
      
      The change to gc-sections-shared makes us match bfd. Just because we
      kept bar doesn't mean it has to be in the dynamic symbol table.
      
      The changes to invalid-dynamic-list.test and reproduce.s are because
      of the new parser.
      
      The changes to version-script.s are the only case where we change
      behavior with regards to bfd, but I would like to see a mix of
      --version-script and --dynamic-list used in the wild before
      complicating the code.
      
      llvm-svn: 289082
      d0ebd84c
  4. Dec 07, 2016
  5. Nov 29, 2016
  6. Nov 28, 2016
  7. Nov 26, 2016
  8. Nov 25, 2016
    • Rui Ueyama's avatar
      Support -color-diagnostics={auto,always,never}. · 8c8818a5
      Rui Ueyama authored
      -color-diagnostics=auto is default because that's the same as
      Clang's default. When color is enabled, error or warning messages
      are colored like this.
      
        error:
        <bold>ld.lld</bold> <red>error:</red> foo.o: no such file
      
        warning:
        <bold>ld.lld</bold> <magenta>warning:</magenta> foo.o: no such file
      
      Differential Revision: https://reviews.llvm.org/D27117
      
      llvm-svn: 287949
      8c8818a5
  9. Nov 23, 2016
  10. Nov 18, 2016
  11. Nov 17, 2016
  12. Nov 16, 2016
  13. Nov 12, 2016
    • George Rimar's avatar
      [ELF] - Add support for locals list in version script. · bb6c01e7
      George Rimar authored
      Previously we did not support anything except "local: *", patch changes that.
      
      Actually GNU rules of proccessing wildcards are more complex than that (http://www.airs.com/blog/archives/300):
      There are 2 iteration for wildcards, at first iteration "*" wildcards are ignored and handled at second iteration.
      
      Since we previously decided not to implement such complex rules,
      I suggest solution that is implemented in this patch. So for "local: *" case nothing changes,
      but if we have wildcarded locals,
      they are processed before wildcarded globals. 
      
      This should fix several FreeBSD ports, one of them is jpeg-turbo-1.5.1 and
      currently blocks about 5k of ports.
      
      Differential revision: https://reviews.llvm.org/D26395
      
      llvm-svn: 286713
      bb6c01e7
  14. Nov 10, 2016
    • George Rimar's avatar
      [ELF] - Implemented --symbol-ordering-file option. · 1a33c0f2
      George Rimar authored
      Patch allows to pass a symbols file to linker.
      LLD will map symbols to sections and sort sections
      in output according to symbol ordering file.
      
      That can help to reduce the startup time and/or
      amount of pagefaults during startup.
      
      Also, interesting benchmark result was produced by Rafael Espíndola. 
      After applying the symbols file for clang he timed compiling 
      X86MCTargetDesc.ii to an object file.  
      
      The page faults went from just
      56,988 to 56,946 since most faults are not in the binary.
      Running time went from 4.403053515 to 4.178112244. 
      The speedup seems to be because of better cache
      locality.
      
      Differential revision: https://reviews.llvm.org/D26130
      
      llvm-svn: 286440
      1a33c0f2
  15. 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
  16. Oct 27, 2016
  17. Oct 26, 2016
    • Rafael Espindola's avatar
      Call _exit. · cb09daab
      Rafael Espindola authored
      As the state of lld gets more complicated, shutting down gets more
      expensive.
      
      In a normal lld run we can just call _exit immediately after renaming
      the temporary output file. We still want the ability to run a full
      shutdown since that is useful for detecting memory leaks.
      
      This patch adds a --full-shutdown flag and changes lit to use it.
      
      llvm-svn: 285224
      cb09daab
  18. 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
    • Rui Ueyama's avatar
      Remove Config::Binary. · c3d15128
      Rui Ueyama authored
      This member is used only by LinkerDriver, so move it to LinkerDriver.
      
      llvm-svn: 284696
      c3d15128
    • Rui Ueyama's avatar
      Allow linker-script-defined entry symbols. · 8da7aa08
      Rui Ueyama authored
      Previously, we were checking the existence of an entry symbol
      too early. It was done before the linker script processor creates
      symbols defined in scripts. Fixes bug 30743.
      
      llvm-svn: 284676
      8da7aa08
  19. Oct 17, 2016
    • Peter Smith's avatar
      [ELF] Support for R_ARM_TARGET2 relocation · 9bbd4e27
      Peter Smith authored
      The R_ARM_TARGET2 relocation is used in ARM exception tables to encode
      a data dependency that will only be dereferenced by code in the
      run-time support library. In a similar way to R_ARM_TARGET1 the
      handling of the relocation is target specific, it maps to one of
      R_ARM_ABS32, R_ARM_REL32 or R_ARM_GOT_PREL. The choice depends on the 
      run-time library. R_ARM_GOT_PREL is used for linux and BSD,
      R_ARM_ABS32 and R_ARM_REL32 are used for bare-metal.
      
      The command line option --target2=<target> can be used to select the
      relocation used for R_ARM_TARGET2. The default is R_ARM_GOT_PREL.
      
      Differential revision: https://reviews.llvm.org/D25684
      
      llvm-svn: 284404
      9bbd4e27
  20. Oct 14, 2016
    • George Rimar's avatar
      [ELF] - Implemented -z wxneeded. · cc6e567c
      George Rimar authored
      -z wxneeded creates a PHDR PT_OPENBSD_WXNEEDED.
      
      PT_OPENBSD_WXNEEDED
      The array element specifies that a process executing this file may need to be able to map or protect memory regions as simultaneously executable and writable. If the system is unable or unwilling to permit that for this executable then it may fail immediately. This segment type is meaningful only for executable files and is ignored in other objects.
      
      http://man.openbsd.org/OpenBSD-current/man5/elf.5
      
      Differential revision: https://reviews.llvm.org/D25472
      
      llvm-svn: 284226
      cc6e567c
  21. Oct 11, 2016
  22. Sep 28, 2016
  23. Sep 16, 2016
  24. Sep 14, 2016
    • George Rimar's avatar
      [ELF] - Implemented --section-start, -Ttext, -Tdata, -Tbss options. · d73ef173
      George Rimar authored
      --section-start=sectionname=org
      Locate a section in the output file at the absolute address given by org. 
      You may use this option as many times as necessary to locate multiple sections in the command line.
       org must be a single hexadecimal integer; for compatibility with other linkers, 
      you may omit the leading `0x' usually associated with hexadecimal values. 
      Note: there should be no white space between sectionname, the equals sign (“<=>”), and org.
      
      -Tbss=org
      -Tdata=org
      -Ttext=org
      Same as --section-start, with .bss, .data or .text as the sectionname.
      
      Differential revision: https://reviews.llvm.org/D24294
      
      llvm-svn: 281458
      d73ef173
    • Rafael Espindola's avatar
      Use murmurhash2 instead of fnv. · d88d7166
      Rafael Espindola authored
      It is substantially faster by processing 8 bytes at a time.
      
      llvm-svn: 281454
      d88d7166
  25. Sep 10, 2016
  26. Sep 09, 2016
Loading