Skip to content
  1. Jul 15, 2017
  2. Jul 14, 2017
  3. Jul 13, 2017
    • Rui Ueyama's avatar
      Move feature-specific functions out of Strings.cpp. · 1e77ad14
      Rui Ueyama authored
      Functions declared in Strings.h should provide generic string operations
      for the linker, but some of them are too specific to some features. This
      patch moves them to the location where they are used.
      
      llvm-svn: 307949
      1e77ad14
    • Reid Kleckner's avatar
      [COFF] Bounds check relocations · 3b8acb2c
      Reid Kleckner authored
      Summary:
      This would have caught the invalid object file I used in my test case in
      r307726. The OOB was only caught by ASan later, which is slow and
      doesn't work on some platforms. LLD should do some basic input
      validation itself. This check isn't perfect, so relocations can reach
      OOB by up to seven bytes, but it's better than what we had and probably
      cheap.
      
      Reviewers: ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35371
      
      llvm-svn: 307948
      3b8acb2c
    • Reid Kleckner's avatar
      [PDB] Fix type server handling for archives · 6597c28d
      Reid Kleckner authored
      Summary:
      This fixes type indices for SDK or CRT static archives. Previously we'd
      try to look next to the archive object file path, which would not exist
      on the local machine.
      
      Also error out if we can't resolve a type server record. Hypothetically
      we can recover from this error by discarding debug info for this object,
      but that is not yet implemented.
      
      Reviewers: ruiu, amccarth
      
      Subscribers: aprantl, hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35369
      
      llvm-svn: 307946
      6597c28d
    • Rafael Espindola's avatar
      Refactor gdb index creation. · 300b3867
      Rafael Espindola authored
      I have a patch to let DwarfContext defer to lld for getting section
      contents and relocations.
      
      That is a pretty big performance improvement.
      
      This is just a refactoring to make that easier to do.
      
      This change makes the *creation* of gdb index a dedicated step and
      makes that templated. That is so that we can uses Elf_Rel in the code.
      
      llvm-svn: 307867
      300b3867
  4. Jul 12, 2017
  5. Jul 11, 2017
  6. Jul 10, 2017
    • Zachary Turner's avatar
      Fix pdb-linker-module test on linux. · 77f23b9c
      Zachary Turner authored
      lld-link is apparently a symlink to lld.  Our pdb writing code
      uses llvm::sys::fs::getMainExecutable() and writes that value
      into the PDB, which will resolve symlinks etc.  But what we
      really want is the exact value of argv[0], which matches what
      the MS linker does.  Fix this by just writing argv[0] instead
      of calling getMainExecutable.
      
      llvm-svn: 307592
      77f23b9c
    • Zachary Turner's avatar
      [lld/pdb] Add some basic linker module symbols. · 6708e0b4
      Zachary Turner authored
      Differential Revision: https://reviews.llvm.org/D35152
      
      llvm-svn: 307590
      6708e0b4
    • Zachary Turner's avatar
      Resubmit "Add pdb-diff test." · a9d944fd
      Zachary Turner authored
      This was originally reverted because of two issues.
        1) Printing ANSI color escape codes even when outputting to
           a file
        2) Module name comparisons were failing when comparing a PDB
           generated on one machine to a PDB generated on another
           machine.
      
      I attempted to fix #2 by adding command line options which let
      you specify prefixes to strip from the beginning of embedded
      paths, which effectively lets us specify a path to "base" each
      PDB from and only compare the parts under the base.  But this is
      tricky because PDB paths always use Windows path syntax, even
      when they are created on non-Windows hosts.  A problem still
      existed when constructing the prefix to strip, where we were
      accidentally using a host-specific path separator instead of
      a Windows path separator.
      
      This resubmission fixes the issue on Linux (and I have verified
      that the test now passes on Linux).
      
      llvm-svn: 307571
      a9d944fd
    • Zachary Turner's avatar
      Revert "Build fixes for pdb-diff test." · ba3836bc
      Zachary Turner authored
      This reverts commit 180af3fdbdb17ec35b45ec1f925fd743b28d37e1.
      
      This is still breaking due to linux-specific path differences.
      
      llvm-svn: 307559
      ba3836bc
    • Zachary Turner's avatar
      Fix pdb-diff test. · 6da7a305
      Zachary Turner authored
      A test was checked in on Friday that worked by checking in an
      object file and PDB generated locally by MSVC, and then having
      the test run lld-link on the object file and diffing LLD's PDB
      against the checked in PDB.
      
      This failed because part of the diffing algorithm involves
      determining if two modules are the same, and if so drilling into
      the module and diffing individual fields of the module.  The
      only thing we can use to make this determination though is the
      "name" of the module, which is a path to where the module (obj
      file) was read from on the machine where it was linked.  This
      fails for obvious reasons when comparing a PDB generated on one
      machine to a PDB on another machine.
      
      The fix employed here is to add two command line options to the
      diff subcommand, which allow the user to specify a "binary root
      path".  The bin root path, if specified, is stripped from the
      beginning of any embedded PDB paths.  The test is updated to
      specify the user's local test output directory for the left
      PDB, and is hardcoded to the location where the original PDB
      was created for the right PDB.  This way all the equivalence
      comparisons should succeed.
      
      llvm-svn: 307555
      6da7a305
  7. Jul 08, 2017
    • Eric Beckmann's avatar
      Revert "Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""" · c8dba240
      Eric Beckmann authored
      This reverts commit 147f45ff24456aea59575fa4ac16c8fa554df46a.
      
      Revert "Revert "Revert "Revert "Replace trivial use of external rc.exe by writing our own .res file.""""
      
      This reverts commit 61a90a67ed54a1f0dfeab457b65abffa129569e4.
      
      The patches were intially reverted because they were causing a failure
      on CrWinClangLLD.  Unfortunately, this was done haphazardly and didn't
      compile, so the revert was reverted again quickly to fix this.  One that
      was done, the revert of the revert was itself reverted.  This allowed me
      to finally fix the actual bug in r307452.  This patch re-enables the
      code path that had originally been causing the bug, now that it (should)
      be fixed.
      
      llvm-svn: 307460
      c8dba240
    • Zachary Turner's avatar
      Delete the pdb diff test. · 41f6a453
      Zachary Turner authored
      This is failing on Linux for unknown reasons, so I need to
      get the bots green while I investigate.
      
      llvm-svn: 307459
      41f6a453
    • Eric Beckmann's avatar
      Add name offset flags, for parity with cvtres.exe. · 7c865f00
      Eric Beckmann authored
      Summary:
      The original cvtres.exe sets the high bit when an identifier offset
      points to a string.  Even though this is not mentioned in the spec, and
      in fact does not seem to cause errors with most cases, for some reason
      this causes a failure in Chromium where the new resource file is not
      verified as a new version.  This patch sets this high bit flag, and also
      adds a test case to check that the output of our library is always
      identical to original cvtres.
      
      Reviewers: zturner, ruiu
      
      Subscribers: llvm-commits, hiraditya
      
      Differential Revision: https://reviews.llvm.org/D35099
      
      llvm-svn: 307452
      7c865f00
  8. Jul 07, 2017
    • Zachary Turner's avatar
      [PDB] More changes to bring lld PDBs to parity with MSVC. · 3a11fdf8
      Zachary Turner authored
      1) Don't write a /src/headerblock stream.  This appears to be
         written conditionally by MSVC, but it's not clear what the
         condition is.  For now, just remove it since we dont' know
         what it is anyway and the particular pdb we've checked in
         for the test doesn't have one.
      2) Write a valid timestamp for the PDB file signature.  This
         leads to non-reproducible builds, but it matches the default
         behavior of link, so it should be out default as well.  If
         we need reproducibility, we should add a separate command
         line option for it that is off by default.
      3) Write an empty FPO stream.  MSVC seems to always write an
         FPO stream.  This change makes the stream directory match
         up, although we still need to make the contents of the FPO
         stream match.
      
      llvm-svn: 307436
      3a11fdf8
Loading