Skip to content
  1. Dec 22, 2016
  2. Dec 19, 2016
    • George Rimar's avatar
      [ELF] - Implemented --retain-symbols-file option · 2bb88ab5
      George Rimar authored
      --retain-symbols-file=filename
      Retain only the symbols listed in the file filename, discarding all others. 
      filename is simply a flat file, with one symbol name per line. This option 
      is especially useful in environments (such as VxWorks) where a large global 
      symbol table is accumulated gradually, to conserve run-time memory.
      
      Note: though documentation says "--retain-symbols-file does not discard 
      undefined symbols, or symbols needed for relocations.", both bfd and gold 
      do that, and this patch too, like testcase show.
      
      Differential revision: https://reviews.llvm.org/D27716
      
      llvm-svn: 290122
      2bb88ab5
  3. Dec 16, 2016
  4. Dec 15, 2016
    • George Rimar's avatar
      [ELF] - Make LLD accept Ttext-segment X/Ttext-segment=X aliases for -Ttext. · 6cbfce77
      George Rimar authored
      It os used in work/emulators/qemu-user-static port.
      Which tries to use -Ttext-segment and then:
      
      # In case ld does not support -Ttext-segment, edit the default linker
      # script via sed to set the .text start addr.  This is needed on FreeBSD
      # at least.
      <here it calls -verbose to extract and edit default bfd linker script.>
      
      Actually now we are do not fully support -Ttext properly (see D27613),
      but we also seems never will provide anything close to default script, like bfd do,
      so at least this patch introduces proper alias handling.
      
      llvm-svn: 289827
      6cbfce77
  5. Nov 29, 2016
  6. Nov 28, 2016
  7. Nov 25, 2016
    • 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
  8. Nov 23, 2016
    • Rui Ueyama's avatar
      Limit default maximum number of errors to 20. · ac95f6bf
      Rui Ueyama authored
      This is in the context of https://llvm.org/bugs/show_bug.cgi?id=31109.
      When LLD prints out errors for relocations, it tends to print out
      extremely large number of errors (like millions) because it would
      print out one error per relocation.
      
      This patch makes LLD bail out if it prints out more than 20 errors.
      You can configure the limitation using -error-limit argument.
      -error-limit=0 means no limit.
      
      I chose the flag name because Clang has the same feature as -ferror-limit.
      "f" doesn't make sense to us, so I omitted it.
      
      Differential Revision: https://reviews.llvm.org/D26981
      
      llvm-svn: 287789
      ac95f6bf
  9. Nov 22, 2016
  10. Nov 19, 2016
    • George Rimar's avatar
      [ELF] - Exit on --version call. · 0a94bffe
      George Rimar authored
      GNU linkers disagree here.
      Though both -version and -v are mentioned
      in help to print the version information, GNU ld just normally exits,
      while gold can continue linking. We are compatible with ld.bfd here.
      
      This fixes PR31057.
      
      Differential revision: https://reviews.llvm.org/D26865
      
      llvm-svn: 287448
      0a94bffe
  11. Nov 16, 2016
  12. Nov 14, 2016
    • George Rimar's avatar
      [ELF] - Ignore -Map,-M and --cref options. · e784395c
      George Rimar authored
      -M, --print-map Write map file on standard output
      -Map MAPFILENAME Write map file
      --cref	Output cross reference table
      
      This is relative to PR30973.
      
      Next FreeBSD ports were atm failing because of 
      lack of -Map, -M and --cref:
      
      sysutils/openipmi
      emulators/adamem
      devel/jwasm
      net/pimd
      devel/k8048
      textproc/libcrm114
      lang/micropython
      net/mrouted
      print/openprinting
      
      After this patch all of them can be link fine.
      
      llvm-svn: 286831
      e784395c
  13. Nov 10, 2016
    • 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
    • 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
  14. Nov 09, 2016
    • George Rimar's avatar
      [ELF] - Add separate form for -R alias. · 470de711
      George Rimar authored
      During link of devel/chrpath (FreeBSD port), found next issue:
      /usr/bin/ld: error: unclosed comment in a linker script
      /usr/bin/ld: error: line 1: unknown directive: �
      /usr/bin/ld: error: ��
      
      Problem was not obvious and the reason was that we did not accept
      the separate form of -R. While invocation line contained it:
      cc -Wl,-R /usr/local/lib -o prog prog.c
      
      CPIO file produced contained /usr/local/lib file. 
      Which looks because of reasons above
      contained inside the content of whole lib folder, 
      and it then was passed as an input and
      proccessed as linker script.
      
      llvm-svn: 286378
      470de711
    • George Rimar's avatar
      [ELF] - Ignore -stats command line option. · 25143dfd
      George Rimar authored
      llvm-svn: 286348
      25143dfd
  15. Nov 03, 2016
  16. Nov 02, 2016
  17. Oct 26, 2016
    • Rafael Espindola's avatar
      Call _exit. · cb09daab
      Rafael Espindola authored
      As the state of lld gets more complicated, shutting down gets more
      expensive.
      
      In a normal lld run we can just call _exit immediately after renaming
      the temporary output file. We still want the ability to run a full
      shutdown since that is useful for detecting memory leaks.
      
      This patch adds a --full-shutdown flag and changes lit to use it.
      
      llvm-svn: 285224
      cb09daab
  18. Oct 20, 2016
    • George Rimar's avatar
      [ELF] - Partial support of --gdb-index command line option (Part 1). · 58fa5243
      George Rimar authored
      In this patch partial gdb_index section is created. 
      For costructing the .gdb_index section 6 steps should be performed (details are in
      SplitDebugInfo.cpp file header), this patch do first 3:
      
      Creates proper section header.
      Fills list of compilation units.
      Types CU list area is not supposed to be supported, so it is ignored and therefore
      can be treated as implemented either.
      
      Differential revision: https://reviews.llvm.org/D24706
      
      llvm-svn: 284708
      58fa5243
  19. Oct 17, 2016
  20. Oct 11, 2016
  21. Sep 16, 2016
  22. Sep 14, 2016
    • George Rimar's avatar
      [ELF] - Implemented --section-start, -Ttext, -Tdata, -Tbss options. · d73ef173
      George Rimar authored
      --section-start=sectionname=org
      Locate a section in the output file at the absolute address given by org. 
      You may use this option as many times as necessary to locate multiple sections in the command line.
       org must be a single hexadecimal integer; for compatibility with other linkers, 
      you may omit the leading `0x' usually associated with hexadecimal values. 
      Note: there should be no white space between sectionname, the equals sign (“<=>”), and org.
      
      -Tbss=org
      -Tdata=org
      -Ttext=org
      Same as --section-start, with .bss, .data or .text as the sectionname.
      
      Differential revision: https://reviews.llvm.org/D24294
      
      llvm-svn: 281458
      d73ef173
  23. Sep 10, 2016
  24. Sep 09, 2016
    • Rui Ueyama's avatar
      Fix -output option. · a60058c8
      Rui Ueyama authored
      Usually, options that are longer than one character can be preceded
      either by "-" or "--", but options starting with "o" are exceptions
      because they conflict with "-o" option. They have to be preceded by
      "--".
      
      llvm-svn: 281004
      a60058c8
  25. Sep 08, 2016
  26. Sep 07, 2016
  27. Sep 06, 2016
  28. Sep 02, 2016
  29. Aug 25, 2016
  30. Aug 18, 2016
  31. Aug 16, 2016
  32. Aug 03, 2016
Loading