- Nov 23, 2016
-
-
Rui Ueyama authored
llvm-svn: 287797
-
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 18, 2016
-
-
Rui Ueyama authored
llvm-svn: 287318
-
- Nov 17, 2016
-
-
Rui Ueyama authored
Because it is uint16_t in the ELF spec. Using size_t was confusing. llvm-svn: 287198
-
- Nov 16, 2016
-
-
George Rimar authored
This change separates all versioned locals to be a separate list in config, that was suggested by Rafael and simplifies the logic a bit. Differential revision: https://reviews.llvm.org/D26754 llvm-svn: 287132
-
- Nov 12, 2016
-
-
George Rimar authored
Previously we did not support anything except "local: *", patch changes that. Actually GNU rules of proccessing wildcards are more complex than that (http://www.airs.com/blog/archives/300): There are 2 iteration for wildcards, at first iteration "*" wildcards are ignored and handled at second iteration. Since we previously decided not to implement such complex rules, I suggest solution that is implemented in this patch. So for "local: *" case nothing changes, but if we have wildcarded locals, they are processed before wildcarded globals. This should fix several FreeBSD ports, one of them is jpeg-turbo-1.5.1 and currently blocks about 5k of ports. Differential revision: https://reviews.llvm.org/D26395 llvm-svn: 286713
-
- Nov 10, 2016
-
-
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 05, 2016
-
-
Simon Atanasyan authored
In short the patch introduces support for linking object file conform MIPS N32 ABI [1]. This ABI is similar to N64 ABI but uses 32-bit pointer size. The most non-trivial requirement of this ABI is one more relocation packing format. N64 ABI puts multiple relocation type into the single relocation record. The N32 ABI uses series of successive relocations with the same offset for this purpose. In this patch, new function `mergeMipsN32RelTypes` handle this case and "convert" N32 relocation to the N64 relocation so the rest of the code keep unchanged. For now, linker does not support series of relocations applied to sections without SHF_ALLOC bit. Probably later I will add the support or insert some sort of assert into the `relocateNonAlloc` routine to catch this case. [1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf Differential revision: https://reviews.llvm.org/D26298 llvm-svn: 286052
-
- Oct 27, 2016
-
-
Rafael Espindola authored
This allows us to set a value for it based on -m. llvm-svn: 285294
-
- 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
-
Rui Ueyama authored
This member is used only by LinkerDriver, so move it to LinkerDriver. llvm-svn: 284696
-
Rui Ueyama authored
Previously, we were checking the existence of an entry symbol too early. It was done before the linker script processor creates symbols defined in scripts. Fixes bug 30743. llvm-svn: 284676
-
- 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
-
- Oct 14, 2016
-
-
George Rimar authored
-z wxneeded creates a PHDR PT_OPENBSD_WXNEEDED. PT_OPENBSD_WXNEEDED The array element specifies that a process executing this file may need to be able to map or protect memory regions as simultaneously executable and writable. If the system is unable or unwilling to permit that for this executable then it may fail immediately. This segment type is meaningful only for executable files and is ignored in other objects. http://man.openbsd.org/OpenBSD-current/man5/elf.5 Differential revision: https://reviews.llvm.org/D25472 llvm-svn: 284226
-
- Oct 11, 2016
-
-
Rui Ueyama authored
llvm-svn: 283910
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D25452 llvm-svn: 283817
-
- Sep 28, 2016
-
-
Petr Hosek authored
This options issupported by both BFD ld and gold and allows overriding the max page size whose default values are defined by the target. https://llvm.org/bugs/show_bug.cgi?id=30541 Differential Revision: https://reviews.llvm.org/D24891 llvm-svn: 282596
-
- Sep 16, 2016
-
-
Rui Ueyama authored
Because it corresponds to SORT_NONE. None was renamed Default. llvm-svn: 281776
-
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
-
Rafael Espindola authored
It is substantially faster by processing 8 bytes at a time. llvm-svn: 281454
-
- 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
-
-
George Rimar authored
Fixed code that was not checked before on windows for me, because of testcases that are disabled on that platform atm. Inital commit message: "[ELF] - Versionscript: do not treat non-wildcarded names as wildcards." Previously we incorrectly handled cases when symbol name in extern c++ tag was enclosed in quotes. Next case was treated as wildcard: GLIBCXX_3.4 { extern "C++" { "aaa*" } But it should have not. Quotes around aaa here means that we should have do exact name matching. That is PR30268 which has name with pointer is interpreted as wildcard by lld: extern "C++" { "operator delete[](void*)"; Patch fixes the issue. Differential revision: https://reviews.llvm.org/D24229 llvm-svn: 281049
-
George Rimar authored
Broken BB: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/27211 llvm-svn: 281046
-
George Rimar authored
Fixed code that was not checked by testcases that are disabled on windows. Inital commit message: "[ELF] - Versionscript: do not treat non-wildcarded names as wildcards." Previously we incorrectly handled cases when symbol name in extern c++ tag was enclosed in quotes. Next case was treated as wildcard: GLIBCXX_3.4 { extern "C++" { "aaa*" } But it should have not. Quotes around aaa here means that we should have do exact name matching. That is PR30268 which has name with pointer is interpreted as wildcard by lld: extern "C++" { "operator delete[](void*)"; Patch fixes the issue. Differential revision: https://reviews.llvm.org/D24229 llvm-svn: 281045
-
George Rimar authored
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/19703 llvm-svn: 281041
-
George Rimar authored
Previously we incorrectly handled cases when symbol name in extern c++ tag was enclosed in quotes. Next case was treated as wildcard: GLIBCXX_3.4 { extern "C++" { "aaa*" } But it should have not. Quotes around aaa here means that we should have do exact name matching. That is PR30268 which has name with pointer is interpreted as wildcard by lld: extern "C++" { "operator delete[](void*)"; Patch fixes the issue. Differential revision: https://reviews.llvm.org/D24229 llvm-svn: 281038
-
- Sep 08, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D23925 llvm-svn: 280912
-
- Sep 02, 2016
-
-
Rui Ueyama authored
"Error" looks like it is indicating a parse error. "Error" actually instructs the later process to report an error if there's an error condition. Thus the new name. llvm-svn: 280529
-
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 31, 2016
-
-
George Rimar authored
DiscardPolicy is enum replacing several boolean options. This approach is not only consistent with what we use for unresolveds (UnresolvedPolicy), but also should help to solve a problem of options with opposing meanings, mentioned in PR28843 Differential revision: https://reviews.llvm.org/D23868 llvm-svn: 280209
-
George Rimar authored
This approach is not only consistent with UnresolvedPolicy, but also should help to solve a problem of options with opposing meanings, mentioned in PR28843 Differential revision: https://reviews.llvm.org/D23869 llvm-svn: 280206
-
- Aug 26, 2016
-
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D23349 llvm-svn: 279810
-
- Aug 25, 2016
-
-
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
-
-
Petr Hosek authored
This option can be used to specify the stack size of the PT_GNU_STACK segment. Differential Revision: https://reviews.llvm.org/D23538 llvm-svn: 279013
-
- Aug 01, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D22990 llvm-svn: 277369
-
- Jul 17, 2016
-
-
Rui Ueyama authored
llvm-svn: 275724
-
Rui Ueyama authored
Versions can be assigned to symbols in two different ways. One is the usual version scripts, and the other is special symbol suffix '@'. If a symbol contains '@', the string after that is considered to specify a version name. Previously, we look for '@' for all symbols. Anything that works on every symbol can be expensive because the linker has to handle a lot of symbols. The search for '@' was not an exception. In this patch, I made two optimizations. The first optimization is to handle '@' only when at least one version is defined. If no versions are defined, no versions can be assigned to any symbols, so it's waste of time to search for '@'. The second optimization is to scan only suffixes of symbol names instead of entire symbol names. Symbol names can be very long, but symbol versions are usually short, so scanning entire symbol names is waste of time, too. There are some error cases which we no longer be able to detect with this patch. I don't think it's a major drawback because they are minor errors. Speed is more important. This change improves LLD with debug info self-link time from 6.6993 seconds to 6.3426 seconds (or -5.3%). Differential Revision: https://reviews.llvm.org/D22433 llvm-svn: 275711
-