Skip to content
  1. Feb 19, 2017
    • David Blaikie's avatar
      Revert "[COFF] support /ERRORLIMIT option" · 4cdfe699
      David Blaikie authored
      Behavior races on ErrorCount. If the enqueued paths are evaluated
      eagerly (in enqueuePath) then the behavior is as the test expects. But
      they may not be evaluated until the future is waited on, in run() -
      which is after the early return/exit on ErrorCount. (this causes the
      test to fail (because in the "/ERRORCOUNT:XYZ" test, no other errors
      are printed), at least for me, on linux)
      
      This reverts commit r295507.
      
      llvm-svn: 295590
      4cdfe699
  2. Feb 17, 2017
    • Bob Haarman's avatar
      [COFF] support /ERRORLIMIT option · b96b1010
      Bob Haarman authored
      Summary: This adds support for reporting multiple errors in a single invocation of lld-link. The limit defaults to 20 and can be changed with the /ERRORLIMIT command line parameter, or set to unlimited by passing a value of 0.
      
      Reviewers: pcc, ruiu
      
      Reviewed By: ruiu
      
      Differential Revision: https://reviews.llvm.org/D29691
      
      llvm-svn: 295507
      b96b1010
    • George Rimar's avatar
      [ELF] - Added support of linkerscript's "/DISCARD/" for --emit-relocs · 858a659a
      George Rimar authored
      Previously LLD crashed on on provided testcases because "/DISCARD/" was
      not supported. Patch implements that.
      
      After this I think there is no known issues with --emit-relocs implementation
      required for linux kernel linking.
      
      Differential revision: https://reviews.llvm.org/D29273
      
      llvm-svn: 295488
      858a659a
    • Rafael Espindola's avatar
      Fix --print-gc-sections with linker scripts. · 3773bcac
      Rafael Espindola authored
      Before it would never print anything.
      
      Thanks to George Rimar for pointing it out.
      
      llvm-svn: 295485
      3773bcac
    • George Rimar's avatar
      [ELF] - Move DependentSections vector from InputSection to InputSectionBase · 647c1685
      George Rimar authored
      I splitted it from D29273.
      Since we plan to make relocatable sections as dependent for target ones for
      --emit-relocs implementation, this change is required to support .eh_frame case.
      
      EhInputSection inherets from InputSectionBase and not from InputSection.
      So for case when it has relocation section, it should be able to access DependentSections
      vector.
      
      This case is real for Linux kernel.
      
      Differential revision: https://reviews.llvm.org/D30084
      
      llvm-svn: 295483
      647c1685
    • Rafael Espindola's avatar
      Don't print DISCARD sections as gced. · ecbfd871
      Rafael Espindola authored
      This is a small difference I noticed to gold and bfd. When given
      --print-gc-sections, we print sections a linkerscript marks
      DISCARD. The other linkers don't.
      
      llvm-svn: 295467
      ecbfd871
    • Rafael Espindola's avatar
      Diagnose another case of the location counter moving backwards. · 679828ff
      Rafael Espindola authored
      This case should be possible to handle, but it is hard:
      
      * In order to create program headers correctly, we have to scan the
        sections in the order they are in the file.
      
      * To find that order, we have to "execute" the linker script.
      
      * The linker script can contain SIZEOF_HEADERS.
      
      So to support this we have to start with a guess of how many headers
      we need (3), run the linker script and try to create the program
      headers. If it turns out we need more headers, we run the script again
      with a larger SIZEOF_HEADERS.
      
      Also, running the linker script depends on knowing the size of the
      sections, so we have to finalize them. But creating the program
      headers can change the value stored in some sections, so we have to
      split size finalization and content finalization.
      
      Looks like the last part is also needed for range extension thunks, so
      we might support this at some point. For now just report an error
      instead of producing broken files.
      
      llvm-svn: 295458
      679828ff
    • Rafael Espindola's avatar
      Reject moving the location counter backwards. · 4cd7352c
      Rafael Espindola authored
      We were only checking when the assignment was inside a section.
      
      llvm-svn: 295454
      4cd7352c
    • Rafael Espindola's avatar
      Add static. NFC. · 1a5c152b
      Rafael Espindola authored
      llvm-svn: 295448
      1a5c152b
    • Rui Ueyama's avatar
      Rename getAliases -> getSymbolsAt. · 85c2201f
      Rui Ueyama authored
      The previous name caused a little confusion because the function not
      only returns aliases but a given symbol itself too.
      
      llvm-svn: 295408
      85c2201f
    • Rui Ueyama's avatar
      Add a comment. · 5acac350
      Rui Ueyama authored
      llvm-svn: 295388
      5acac350
    • Rafael Espindola's avatar
      Merge reloc sections in -emit-reloc mode. · ee61d358
      Rafael Espindola authored
      Without this we would produce two relocation sections pointing to the
      same section, which gnu tools reject.
      
      This fixes pr31986.
      
      The implementation of -r/--emit-reloc is getting fairly
      complicated. But lets get the test passing before trying to refactor
      it.
      
      llvm-svn: 295385
      ee61d358
    • Zachary Turner's avatar
      [pdb] Add the ability to resolve TypeServer PDBs. · 7b327d05
      Zachary Turner authored
      Some PDBs or object files can contain references to other PDBs
      where the real type information lives.  When this happens,
      all type indices in the original PDB are meaningless because
      their records are not there.
      
      With this patch we add the ability to pull type info from those
      secondary PDBs.
      
      Differential Revision: https://reviews.llvm.org/D29973
      
      llvm-svn: 295382
      7b327d05
  3. Feb 16, 2017
  4. Feb 15, 2017
    • Ed Schouten's avatar
      Make --export-dynamic work on non-PIC/PIE targets. · 3bf71304
      Ed Schouten authored
      For CloudABI I'm only interested in generating non-PIC/PIE executables
      on armv6 and i686, as PIE introduces larger overhead than on aarch64 and
      x86_64. Still, I want to be able to instruct the linker to generate a
      dynamic symbol table if requested. One example use for this is that
      dynamic symbol tables can be used by programs to print nicely formatted
      stacktraces, including symbol names.
      
      Right now there seems to be some logic in LLD that it only wants to emit
      dynamic symbol tables when either linking against libraries or when
      building PIC. Let's extend this to also take --export-dynamic into
      account.
      
      Reviewed by:	ruiu
      Differential Revision:	https://reviews.llvm.org/D29982
      
      llvm-svn: 295240
      3bf71304
    • Rui Ueyama's avatar
      Apply different tokenization rules to linker script expressions. · 731a66ae
      Rui Ueyama authored
      The linker script lexer is context-sensitive. In the regular context,
      arithmetic operator characters are regular characters, but in the
      expression context, they are independent tokens. This afects how the
      lexer tokenizes "3*4", for example. (This kind of expression is real;
      the Linux kernel uses it.)
      
      This patch defines function `maybeSplitExpr`. This function splits the
      current token into multiple expression tokens if the lexer is in the
      expression context.
      
      Differential Revision: https://reviews.llvm.org/D29963
      
      llvm-svn: 295225
      731a66ae
    • Rui Ueyama's avatar
      Simplify operator tests. · a4601b5d
      Rui Ueyama authored
      llvm-svn: 295222
      a4601b5d
    • Rui Ueyama's avatar
      Rename a test as they are tests for operators. · fd5edff8
      Rui Ueyama authored
      llvm-svn: 295221
      fd5edff8
    • George Rimar's avatar
      [ELF] - Fix relocation-group.test · 2c29b403
      George Rimar authored
      Main intention of test was to check that 
      we do not crash, but for additional check
      it previously run readobj for input object
      instead of output.
      
      llvm-svn: 295161
      2c29b403
    • Simon Atanasyan's avatar
      [ELF][MIPS] Fix writing updated addend for R_MIPS_GOT16 relocation · 91e30ae2
      Simon Atanasyan authored
      If target of R_MIPS_GOT16 relocation is a local symbol its addend
      is high 16 bits of complete addend. To calculate a final value, the addend
      of this relocation is read, shifted to the left and combined with addend
      of paired R_MIPS_LO16 relocation. To save updated addend when the linker
      produces a relocatable output, we need to store high 16 bits of the
      addend's value. It is different from the case of writing the relocation
      result when the linker saves a 16-bit GOT index as-is.
      
      llvm-svn: 295159
      91e30ae2
    • Rafael Espindola's avatar
      Set the correct r_offset even when creating a R_*_NONE. · d50c8598
      Rafael Espindola authored
      With this lld can use its own -r output when a fde is discarded.
      
      llvm-svn: 295143
      d50c8598
    • Rafael Espindola's avatar
      Make lld able to handle gold's -r output. · f340ca89
      Rafael Espindola authored
      This is still not sufficient for lld to handle its own output when a
      fde points to a discarded section. I am investigating if it is better
      to change the -r output or make lld able to read the current version.
      
      llvm-svn: 295141
      f340ca89
    • Rafael Espindola's avatar
      Handle .eh_frame pointing to discarded section in -r. · 60b02509
      Rafael Espindola authored
      This is a really horrible case. If a .eh_frame points to a discarded
      section, it is not clear what is the correct thing to do.
      
      It looks like ld.bfd discards the entire .eh_frame content and gold
      discards the second relocation, leaving one frame with an fde that
      refers to a bogus location. This is similar to what gold does.
      
      llvm-svn: 295133
      60b02509
    • Rafael Espindola's avatar
      Revert "Relax the restriction on what relocations can be in a non-alloc section." · a8541675
      Rafael Espindola authored
      This reverts commit r295102.
      
      In the link of seabios the assumption seems to be that the section has
      an actual address, so this is not sufficient. Changing the assembly
      code to add a "a" flag seems like the correct thing to do instead of
      extending this hack.
      
      Sorry about the noise.
      
      Original message:
      
          Relax the restriction on what relocations can be in a non-alloc section.
      
          The main thing that they can't have is relocations that require the
          creation of gots or plt.  For now also accept R_PC.
      
          Found while linking seabios.
      
      llvm-svn: 295130
      a8541675
    • Rafael Espindola's avatar
      Fix the st_name of section symbols. · 1b36eeaa
      Rafael Espindola authored
      If it is non-zero then objdump will print an empty name when printing
      relocations against the section.
      
      llvm-svn: 295129
      1b36eeaa
    • Rui Ueyama's avatar
      Explicitly return a new value instead of implicitly mutating a reference. · 35723f09
      Rui Ueyama authored
      I think this is more readable than before.
      
      llvm-svn: 295121
      35723f09
  5. Feb 14, 2017
Loading