Skip to content
  1. Jan 12, 2017
  2. Nov 26, 2016
  3. Nov 25, 2016
  4. Nov 24, 2016
  5. Nov 23, 2016
  6. Nov 11, 2016
  7. Nov 10, 2016
  8. Oct 27, 2016
    • Rafael Espindola's avatar
      Use fewer allocators. · a8631e38
      Rafael Espindola authored
      Instead of having 3 section allocators per file, have 3 for all files.
      
      This is a substantial performance improvement for some cases. Linking
      chromium without gc speeds up by 1.065x.
      
      This requires using _exit in fatal since we have to avoid destructing
      an InputSection if fatal is called from the constructor.
      
      Thanks to Rui for the suggestion.
      
      llvm-svn: 285290
      a8631e38
  9. Oct 19, 2016
  10. Oct 07, 2016
  11. Oct 06, 2016
  12. Sep 29, 2016
  13. Jul 18, 2016
  14. Jul 15, 2016
    • Rui Ueyama's avatar
      Avoid writing to errs(). · 112351dc
      Rui Ueyama authored
      We should write to ErrorOS instead. Normaly, *ErrorOS == errs(),
      but they can be different if LLD is embedded.
      
      llvm-svn: 275525
      112351dc
    • Rui Ueyama's avatar
      ELF: Make error() to always set HasError. · aa2db889
      Rui Ueyama authored
      Previously, it checked for the EC parameter and set HasError
      only when there was an error. But in most places we called
      error only when error had occurred, so this behavior was confusing.
      
      llvm-svn: 275517
      aa2db889
  15. Jul 14, 2016
  16. Jul 07, 2016
  17. Jul 04, 2016
  18. May 04, 2016
  19. May 03, 2016
    • Rafael Espindola's avatar
      Produce cpio files for --reproduce. · 1dd2b3d1
      Rafael Espindola authored
      We want --reproduce to
      
      * not rewrite scripts and thin archives
      * work with absolute paths
      
      Given that, it pretty much has to create a full directory tree. On windows that
      is problematic because of the very short maximum path limit. On most cases
      users can still work around it with "--repro c:\r", but that is annoying and
      not viable for automated testing.
      
      We then need to produce some form of archive with the files. The first option
      that comes to mind is .a files since we already have code for writing them.
      There are a few problems with them
      
      The format has a dedicated string table, so we cannot start writing it until
      all members are known.
      Regular implementations don't support creating directories. We could make
      llvm-ar support that, but that is probably not a good idea.
      The next natural option would be tar. The problem is that to support long path
      names (which is how this started) it needs a "pax extended header" making this
      an annoying format to write.
      
      The next option I looked at seems a natural fit: cpio files.
      
      They are available on pretty much every unix, support directories and long path
      names and are really easy to write. The only slightly annoying part is a
      terminator, but at least gnu cpio only prints a warning if it is missing, which
      is handy for crashes. This patch still makes an effort to always create it.
      
      llvm-svn: 268404
      1dd2b3d1
  20. Mar 13, 2016
    • Rui Ueyama's avatar
      Remove dead code. · 860b13fc
      Rui Ueyama authored
      llvm-svn: 263363
      860b13fc
    • Rui Ueyama's avatar
      Do not return a bool value from error(). · 6eafa7fb
      Rui Ueyama authored
      error returned true if there was an error. This allows us to replace
      the code like this
      
        if (EC) {
          error(EC, "something failed");
          return;
        }
      
      with
      
        if (error(EC, "something failed"))
          return;
      
      I thought that that was a good idea, but it turned out that we only
      have two places to use this pattern. So this patch removes that feature.
      
      llvm-svn: 263362
      6eafa7fb
  21. Mar 03, 2016
  22. Feb 28, 2016
  23. Feb 25, 2016
  24. Feb 02, 2016
  25. Feb 01, 2016
  26. Jan 29, 2016
  27. Jan 28, 2016
    • Rui Ueyama's avatar
      ELF: Rename error -> fatal and redefine error as a non-noreturn function. · 64cfffd3
      Rui Ueyama authored
      In many situations, we don't want to exit at the first error even in the
      process model. For example, it is better to report all undefined symbols
      rather than reporting the first one that the linker picked up randomly.
      
      In order to handle such errors, we don't need to wrap everything with
      ErrorOr (thanks for David Blaikie for pointing this out!) Instead, we
      can set a flag to record the fact that we found an error and keep it
      going until it reaches a reasonable checkpoint.
      
      This idea should be applicable to other places. For example, we can
      ignore broken relocations and check for errors after visiting all relocs.
      
      In this patch, I rename error to fatal, and introduce another version of
      error which doesn't call exit. That function instead sets HasError to true.
      Once HasError becomes true, it stays true, so that we know that there
      was an error if it is true.
      
      I think introducing a non-noreturn error reporting function is by itself
      a good idea, and it looks to me that this also provides a gradual path
      towards lld-as-a-library (or at least embed-lld-to-your-program) without
      sacrificing code readability with lots of ErrorOr's.
      
      http://reviews.llvm.org/D16641
      
      llvm-svn: 259069
      64cfffd3
  28. Sep 24, 2015
  29. Aug 06, 2015
    • Rafael Espindola's avatar
      Move the error handling functions to Error.h. NFC. · 192e1fa5
      Rafael Espindola authored
      llvm-svn: 244216
      192e1fa5
    • Rafael Espindola's avatar
      Port the error functions from ELF to COFF. · b835ae8e
      Rafael Espindola authored
      This has a few advantages
      
      * Less C++ code (about 300 lines less).
      * Less machine code (about 14 KB of text on a linux x86_64 build).
      * It is more debugger friendly. Just set a breakpoint on the exit function and
        you get the complete lld stack trace of when the error was found.
      * It is a more robust API. The errors are handled early and we don't get a
        std::error_code hot potato being passed around.
      * In most cases the error function in a better position to print diagnostics
        (it has more context).
      
      llvm-svn: 244215
      b835ae8e
Loading