- Dec 22, 2016
-
-
Rui Ueyama authored
Previously, that was an alias to -color-diagnostics=auto. However, Clang's -fcolor-diagnostics is an alias to -fcolor-diagnostics=always, so that was confusing. This patch fixes that issue. llvm-svn: 290332
-
- Dec 19, 2016
-
-
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
-
- Dec 16, 2016
-
-
George Rimar authored
--sort-section=xxx is the same as --sort-section xxx, was found in one of FreeBSD ports. llvm-svn: 289938
-
- Dec 15, 2016
-
-
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
-
- Nov 29, 2016
-
-
George Rimar authored
-N (-omagic) Set the text and data sections to be readable and writable. Also, do not page-align the data segment. Differential revision: https://reviews.llvm.org/D26888 llvm-svn: 288123
-
- Nov 28, 2016
-
-
George Rimar authored
--no-rosegment: Do not put read-only non-executable sections in their own segment Differential revision: https://reviews.llvm.org/D26889 llvm-svn: 288020
-
- Nov 25, 2016
-
-
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
-
- Nov 23, 2016
-
-
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
-
- Nov 22, 2016
-
-
Rui Ueyama authored
Fixes PR31126. llvm-svn: 287711
-
Rui Ueyama authored
llvm-svn: 287692
-
- Nov 19, 2016
-
-
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
-
- Nov 16, 2016
-
-
Rui Ueyama authored
llvm-svn: 287072
-
- Nov 14, 2016
-
-
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
-
- Nov 10, 2016
-
-
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
-
George Rimar authored
Without that FreeBSD port was failing with next confuxing error: /usr/bin/ld: error: unknown argument: -fstack-protector llvm-svn: 286451
-
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
-
- Nov 09, 2016
-
-
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
-
George Rimar authored
llvm-svn: 286348
-
- Nov 03, 2016
-
-
George Rimar authored
llvm-svn: 285900
-
- Nov 02, 2016
-
-
George Rimar authored
So patch just defines an alias for -Txxx=YYY forms, this is consistent with ld and should fix PR30814. llvm-svn: 285824
-
- Oct 26, 2016
-
-
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
-
- Oct 20, 2016
-
-
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
-
- Oct 17, 2016
-
-
Peter Smith authored
The R_ARM_TARGET2 relocation is used in ARM exception tables to encode a data dependency that will only be dereferenced by code in the run-time support library. In a similar way to R_ARM_TARGET1 the handling of the relocation is target specific, it maps to one of R_ARM_ABS32, R_ARM_REL32 or R_ARM_GOT_PREL. The choice depends on the run-time library. R_ARM_GOT_PREL is used for linux and BSD, R_ARM_ABS32 and R_ARM_REL32 are used for bare-metal. The command line option --target2=<target> can be used to select the relocation used for R_ARM_TARGET2. The default is R_ARM_GOT_PREL. Differential revision: https://reviews.llvm.org/D25684 llvm-svn: 284404
-
George Rimar authored
This is https://llvm.org/bugs/show_bug.cgi?id=30696, Differential revision: https://reviews.llvm.org/D25676 llvm-svn: 284388
-
- Oct 11, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D25452 llvm-svn: 283817
-
- Sep 16, 2016
-
-
George Rimar authored
This fixes Bug 30385 - SORT_NONE not implemented, `SORT_NONE' disables section sorting by ignoring the command line section sorting option. That is why this patch also implements --sort-section option. Description of sorting rules available at https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html Differential revision: https://reviews.llvm.org/D24604 llvm-svn: 281771
-
- Sep 14, 2016
-
-
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
-
- Sep 10, 2016
-
-
Michael J. Spencer authored
Implemented by building an ELF file in memory. elf, default, and binary match gold behavior. Differential Revision: https://reviews.llvm.org/D24060 llvm-svn: 281108
-
- Sep 09, 2016
-
-
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
-
- Sep 08, 2016
-
-
Rui Ueyama authored
llvm-svn: 280985
-
- Sep 07, 2016
-
-
Ed Maste authored
GCC passes it by default on powerpc64 on FreeBSD. GNU ld claims "this option is ignored for SVR4 compatibility", so we can ignore it too. Differential Revision: https://reviews.llvm.org/D24313 llvm-svn: 280864
-
George Rimar authored
llvm-svn: 280803
-
- Sep 06, 2016
-
-
Petr Hosek authored
This flag is supported by both BFD ld and gold and is occasionally used to negate the effect of -gc-sections flag. Differential Revision: https://reviews.llvm.org/D24270 llvm-svn: 280729
-
- Sep 02, 2016
-
-
Rui Ueyama authored
llvm-svn: 280528
-
George Rimar authored
FreeBSD's libstdc++ build (used on tier-2 architectures) uses GNU ld's -f <name> option, which sets the DT_AUXILIARY field to the specified name. Multiple -f options may be specified and the DT_AUXILIARY entries will be added in the order in which they appear. Patch implements that option. Differential revision: https://reviews.llvm.org/D24139 llvm-svn: 280475
-
- Aug 25, 2016
-
-
George Rimar authored
llvm-svn: 279729
-
George Rimar authored
-oformat output-format `-oformat' option can be used to specify the binary format for the output object file. Patch implements binary format output type. Differential revision: https://reviews.llvm.org/D23769 llvm-svn: 279726
-
- Aug 18, 2016
-
-
Ed Maste authored
Differential Revision: https://reviews.llvm.org/D23124 llvm-svn: 279058
-
- Aug 16, 2016
-
-
Ed Maste authored
llvm-svn: 278819
-
- Aug 03, 2016
-
-
Davide Italiano authored
Also ld.bfd and ld.gold ignore this options. I hit this one in the wild, and just ignoring it's trivial, so, let's do it. llvm-svn: 277531
-