Skip to content
  1. Nov 15, 2016
  2. Nov 14, 2016
  3. 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
    • Rui Ueyama's avatar
      Remove dead code. · da139f79
      Rui Ueyama authored
      llvm-svn: 286698
      da139f79
  4. Nov 11, 2016
  5. Nov 10, 2016
    • Rui Ueyama's avatar
      Include version string into ".comment" section. · 3da3f06d
      Rui Ueyama authored
      Summary:
      This patch adds a ".comment" section to an output. The comment
      section contains the linker's version string. You can now
      find out whether a binary is created by LLD or not using objdump
      command like this.
      
        $ objdump -s -j .comment foo
      
        foo:     file format elf64-x86-64
      
        Contents of section .comment:
         0000 00474343 3a202855 62756e74 7520342e  .GCC: (Ubuntu 4.
         0010 382e342d 32756275 6e747531 7e31342e  8.4-2ubuntu1~14.
         ...
         00c0 766d2f74 72756e6b 20323835 38343629  vm/trunk 285846)
         00d0 004c696e 6b65723a 204c4c44 20342e30  .Linker: LLD 4.0
         00e0 2e302028 7472756e 6b203238 36343036  .0 (trunk 286406
         00f0 2900                                 ).
      
      Compilers emits .comment section as well, so the output contains
      both compiler and linker information.
      
      Alternative considered:
      
      I first tried to add a SHT_NOTE section because GNU gold does that.
      A NOTE section starts with a header which contains content type.
      It turned out that ld.gold sets type NT_GNU_GOLD_VERSION to their
      NOTE section. So the NOTE type is only for GNU gold (surprise!)
      
      Next, I tried to create ".linker-version" section. However, it seems
      that reusing the existing ".comment" section is better because 1)
      other tools already know about .comment section and is able to strip
      it and 2) the result contans not only linker info but also compiler
      info.
      
      Differential Revision: https://reviews.llvm.org/D26487
      
      llvm-svn: 286496
      3da3f06d
    • Davide Italiano's avatar
      [LTO] Call llvm_shutdown on early exit. · 604d3138
      Davide Italiano authored
      In a non-LTO build is a nop. In a LTO build, we deallocate/destroy
      managed static and this allows us to get the output of, e.g.,
      -time-passes without performing a full shutdown.
      
      Differential Revision:  https://reviews.llvm.org/D26517
      
      llvm-svn: 286493
      604d3138
    • Rafael Espindola's avatar
      Replace duplicated '16' with a named constant. · 0e876cfb
      Rafael Espindola authored
      Thanks to Michael Spencer for the suggestion.
      
      llvm-svn: 286462
      0e876cfb
    • Rafael Espindola's avatar
      Parse relocations only once. · 9f0c4bb7
      Rafael Espindola authored
      Relocations are the last thing that we wore storing a raw section
      pointer to and parsing on demand.
      
      With this patch we parse it only once and store a pointer to the
      actual data.
      
      The patch also changes where we store it. It is now in
      InputSectionBase. Not all sections have relocations, but most do and
      this simplifies the logic. It also means that we now only support one
      relocation section per section. Given that that constraint is
      maintained even with -r with gold bfd and lld, I think it is OK.
      
      llvm-svn: 286459
      9f0c4bb7
    • George Rimar's avatar
      Reverted r286451 "[ELF] - Allow separate form for -f (alias for -auxiliary)." · e93e0adb
      George Rimar authored
      Though the patch was technically correct,
      the only FreeBSD port (noticed atm) that tried using it was
      www/mod_jk. And it seems just passed gcc option to linker by mistake:
      
      "-Wl,-L-L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,-fstack-protector -Wl,-fstack-protector -o mod_jk.la "
      
      Given that it is an easy mistake to make, reverting for now.
      
      llvm-svn: 286458
      e93e0adb
    • George Rimar's avatar
      [ELF] - Allow separate form for -f (alias for -auxiliary). · f5a0ef97
      George Rimar authored
      Without that FreeBSD port was failing with next confuxing error:
      /usr/bin/ld: error: unknown argument: -fstack-protector
      
      llvm-svn: 286451
      f5a0ef97
    • Eugene Leviant's avatar
      [ELF] Make SyntheticSection::writeTo pure virtual. NFC. · 12e8a92a
      Eugene Leviant authored
      llvm-svn: 286445
      12e8a92a
    • Eugene Leviant's avatar
      [ELF] Convert .got.plt section to input section · 41ca327b
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D26349
      
      llvm-svn: 286443
      41ca327b
    • 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
    • Rui Ueyama's avatar
      Add comment and simplify code a bit. NFC. · 35e00751
      Rui Ueyama authored
      llvm-svn: 286422
      35e00751
    • Rui Ueyama's avatar
      Remove an overloaded function to simplify. · 1bdaf3e3
      Rui Ueyama authored
      This version of addRegular is almost identical to the other except
      it lacked "size" parameter.
      
      llvm-svn: 286416
      1bdaf3e3
    • Rafael Espindola's avatar
      Make OutputSectionBase a class instead of class template. · e08e78df
      Rafael Espindola authored
      The disadvantage is that we use uint64_t instad of uint32_t for some
      value in 32 bit files. The advantage is a substantially simpler code,
      faster builds and less code duplication.
      
      llvm-svn: 286414
      e08e78df
  6. Nov 09, 2016
Loading