Skip to content
  1. Nov 23, 2016
  2. Nov 18, 2016
  3. Nov 17, 2016
  4. Nov 16, 2016
  5. 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
  6. 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
  7. 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
  8. Oct 27, 2016
  9. 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
  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
    • 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
  11. 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
  12. 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
  13. Oct 11, 2016
  14. Sep 28, 2016
  15. Sep 16, 2016
  16. 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
  17. Sep 10, 2016
  18. Sep 09, 2016
  19. Sep 08, 2016
  20. Sep 02, 2016
  21. Aug 31, 2016
  22. Aug 26, 2016
  23. Aug 25, 2016
  24. Aug 18, 2016
  25. Aug 01, 2016
  26. Jul 17, 2016
    • Rui Ueyama's avatar
      Remove dead code. · 77fa5ee1
      Rui Ueyama authored
      llvm-svn: 275724
      77fa5ee1
    • Rui Ueyama's avatar
      Handle versioned symbols efficiently. · 663b8c27
      Rui Ueyama authored
      Versions can be assigned to symbols in two different ways.
      One is the usual version scripts, and the other is special
      symbol suffix '@'. If a symbol contains '@', the string after
      that is considered to specify a version name.
      
      Previously, we look for '@' for all symbols.
      
      Anything that works on every symbol can be expensive because
      the linker has to handle a lot of symbols. The search for '@'
      was not an exception.
      
      In this patch, I made two optimizations.
      
      The first optimization is to handle '@' only when at least one
      version is defined. If no versions are defined, no versions can
      be assigned to any symbols, so it's waste of time to search for '@'.
      
      The second optimization is to scan only suffixes of symbol names
      instead of entire symbol names. Symbol names can be very long, but
      symbol versions are usually short, so scanning entire symbol names
      is waste of time, too.
      
      There are some error cases which we no longer be able to detect
      with this patch. I don't think it's a major drawback because they
      are minor errors. Speed is more important.
      
      This change improves LLD with debug info self-link time from
      6.6993 seconds to 6.3426 seconds (or -5.3%).
      
      Differential Revision: https://reviews.llvm.org/D22433
      
      llvm-svn: 275711
      663b8c27
Loading