Skip to content
  1. Nov 29, 2016
    • Rafael Espindola's avatar
      Use relocations to fill statically known got entries. · f1e24531
      Rafael Espindola authored
      Right now we just remember a SymbolBody for each got entry and
      duplicate a bit of logic to decide what value, if any, should be
      written for that SymbolBody.
      
      With ARM there will be more complicated values, and it seems better to
      just use the relocation code to fill the got entries. This makes it
      clear that each entry is filled by the dynamic linker or by the static
      linker.
      
      llvm-svn: 288107
      f1e24531
    • Rafael Espindola's avatar
      Sort. NFC. · d3b32df3
      Rafael Espindola authored
      llvm-svn: 288102
      d3b32df3
  2. Nov 28, 2016
  3. Nov 27, 2016
  4. Nov 26, 2016
  5. Nov 25, 2016
    • Rui Ueyama's avatar
      Fix typo. · 1df93169
      Rui Ueyama authored
      llvm-svn: 287951
      1df93169
    • Rui Ueyama's avatar
      c01321c6
    • 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
    • Rui Ueyama's avatar
      We shouldn't call parallle_for_each if -no-thread is given. · 60666414
      Rui Ueyama authored
      llvm-svn: 287948
      60666414
    • Rui Ueyama's avatar
      Parallelize uncompress() and splitIntoPieces(). · 2555952b
      Rui Ueyama authored
      Uncompressing section contents and spliting mergeable section contents
      into smaller chunks are heavy tasks. They scan entire section contents
      and do CPU-intensive tasks such as uncompressing zlib-compressed data
      or computing a hash value for each section piece.
      
      Luckily, these tasks are independent to each other, so we can do that
      in parallel_for_each. The number of input sections is large (as opposed
      to the number of output sections), so there's a large parallelism here.
      
      Actually the current design to call uncompress() and splitIntoPieces()
      in batch was chosen with doing this in mind. Basically what we need to
      do here is to replace `for` with `parallel_for_each`.
      
      It seems this patch improves latency significantly if linked programs
      contain debug info (which in turn contain lots of mergeable strings.)
      For example, the latency to link Clang (debug build) improved by 20% on
      my machine as shown below. Note that ld.gold took 19.2 seconds to do
      the same thing.
      
      Before:
          30801.782712 task-clock (msec)         #    3.652 CPUs utilized            ( +-  2.59% )
               104,084 context-switches          #    0.003 M/sec                    ( +-  1.02% )
                 5,063 cpu-migrations            #    0.164 K/sec                    ( +- 13.66% )
             2,528,130 page-faults               #    0.082 M/sec                    ( +-  0.47% )
        85,317,809,130 cycles                    #    2.770 GHz                      ( +-  2.62% )
        67,352,463,373 stalled-cycles-frontend   #   78.94% frontend cycles idle     ( +-  3.06% )
       <not supported> stalled-cycles-backend
        44,295,945,493 instructions              #    0.52  insns per cycle
                                                 #    1.52  stalled cycles per insn  ( +-  0.44% )
         8,572,384,877 branches                  #  278.308 M/sec                    ( +-  0.66% )
           141,806,726 branch-misses             #    1.65% of all branches          ( +-  0.13% )
      
           8.433424003 seconds time elapsed                                          ( +-  1.20% )
      
      After:
          35523.764575 task-clock (msec)         #    5.265 CPUs utilized            ( +-  2.67% )
               159,107 context-switches          #    0.004 M/sec                    ( +-  0.48% )
                 8,123 cpu-migrations            #    0.229 K/sec                    ( +- 23.34% )
             2,372,483 page-faults               #    0.067 M/sec                    ( +-  0.36% )
        98,395,342,152 cycles                    #    2.770 GHz                      ( +-  2.62% )
        79,294,670,125 stalled-cycles-frontend   #   80.59% frontend cycles idle     ( +-  3.03% )
       <not supported> stalled-cycles-backend
        46,274,151,813 instructions              #    0.47  insns per cycle
                                                 #    1.71  stalled cycles per insn  ( +-  0.47% )
         8,987,621,670 branches                  #  253.003 M/sec                    ( +-  0.60% )
           148,900,624 branch-misses             #    1.66% of all branches          ( +-  0.27% )
      
           6.747548004 seconds time elapsed                                          ( +-  0.40% )
      
      llvm-svn: 287946
      2555952b
    • Rui Ueyama's avatar
      Move typedefs inside a class definition. · 623b36e3
      Rui Ueyama authored
      llvm-svn: 287945
      623b36e3
    • Rui Ueyama's avatar
      Remove a parameter from ScriptParser. · 22375f24
      Rui Ueyama authored
      llvm-svn: 287944
      22375f24
    • Rui Ueyama's avatar
      Move getLocation from Relocations.cpp to InputSection.cpp. · da06bfb7
      Rui Ueyama authored
      The function was used only within Relocations.cpp, but now we are
      using it in many places, so this patch moves it to a file that fits
      to the functionality.
      
      llvm-svn: 287943
      da06bfb7
    • Eugene Leviant's avatar
      [ELF] Add explicit template instantiations for toString · f0477752
      Eugene Leviant authored
      llvm-svn: 287938
      f0477752
    • Eugene Leviant's avatar
      [ELF] Refactor getDynRel to print error location · ab024a35
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D27055
      
      llvm-svn: 287915
      ab024a35
    • Eugene Leviant's avatar
      [ELF] EhOutputSection improvements · c8c1b7bf
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D27098
      
      llvm-svn: 287914
      c8c1b7bf
    • George Rimar's avatar
      [ELF] - Add support for access to most of synthetic sections from linkerscript. · 11992c86
      George Rimar authored
      This is important for cases like:
      
        .sdata        : {
          *(.got.plt .got)
      ...
        }
      
      That was not supported before as there was no way to get access to 
      synthetic sections from script.
      
      More details on review page.
      
      Differential revision: https://reviews.llvm.org/D27040
      
      llvm-svn: 287913
      11992c86
  6. Nov 24, 2016
  7. Nov 23, 2016
    • Rui Ueyama's avatar
      Set default entry point to .text if no entry point is found. · 2eda6d16
      Rui Ueyama authored
      Previously, if a symbol specified by -e or ENTRY() is not found,
      we didn't set entry point address. That is incompatible with GNU
      because GNU linkers set the first address of .text to entry.
      This patch implement that behavior.
      
      llvm-svn: 287836
      2eda6d16
    • Simon Atanasyan's avatar
      [ELF][MIPS] Fix handling of _gp/_gp_disp/__gnu_local_gp symbols · 8469b884
      Simon Atanasyan authored
      Offset between beginning of a .got section and _gp symbols used in MIPS
      GOT relocations calculations. Usually the expression looks like
      VA + Offset - GP, where VA is the .got section address, Offset - offset
      of the GOT entry, GP - offset between .got and _gp. Also there two "magic"
      symbols _gp_disp and __gnu_local_gp which hold the offset mentioned above.
      These symbols might be referenced by MIPS relocations.
      
      Now the linker always defines _gp symbol and uses hardcoded value for
      its initialization. So offset between .got and _gp is 0x7ff0. The _gp_disp
      and __gnu_local_gp defined if required and initialized by 0x7ff0.
      In fact that is not correct because _gp symbol might be defined by a linker
      script and holds arbitrary value. In that case we need to use this value
      in relocation calculation and initialize _gp_disp and __gnu_local_gp
      properly.
      
      The patch fixes the problem and completes fixing the bug #30311.
      https://llvm.org/bugs/show_bug.cgi?id=30311
      
      Differential revision: https://reviews.llvm.org/D27036
      
      llvm-svn: 287832
      8469b884
    • Rui Ueyama's avatar
      Remove trailing whitespace. · 835bd723
      Rui Ueyama authored
      llvm-svn: 287830
      835bd723
    • Rui Ueyama's avatar
      Use llvm::utohexstr instead of Twine::utohexstr. · d3a06ffb
      Rui Ueyama authored
      They are essentially the same in this context, so I prefer the one
      that doesn't need `Twine::`.
      
      llvm-svn: 287814
      d3a06ffb
    • Rafael Espindola's avatar
      Fix this on 32 bit hosts. · 20b6d3d0
      Rafael Espindola authored
      Looks like we have no 32 bit bot that builds with mips support.
      
      llvm-svn: 287799
      20b6d3d0
Loading