summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
* Merging r345002:Tom Stellard2018-10-312-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r345002 | dim | 2018-10-22 22:53:15 -0700 (Mon, 22 Oct 2018) | 41 lines Don't mess up RelIplt symbols during relocatable processing Summary: During upgrading of the FreeBSD source tree with lld 7.0.0, I noticed that it started complaining about `crt1.o` having an "index past the end of the symbol table". Such a symbol table looks approximately like this, viewed with `readelf -s` (note the `Ndx` field being messed up): ``` Symbol table '.symtab' contains 4 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 SECTION LOCAL DEFAULT 1 2: 00000000 0 NOTYPE WEAK HIDDEN RSV[0xffff] __rel_iplt_end 3: 00000000 0 NOTYPE WEAK HIDDEN RSV[0xffff] __rel_iplt_start ``` At first, it seemed that recent ifunc relocation work had caused this: <https://reviews.freebsd.org/rS339351>, but it turned out that it was due to incorrect processing of the object files by lld, when using `-r` (a.k.a. --relocatable). Bisecting showed that rL324421 ("Convert a use of Config->Static") was the commit where this new behavior began. Simply reverting it solved the issue, and the `__rel_iplt` symbols had an index of `UND` again. Looking at Rafael's commit message, I think he simply missed the possibility of `--relocatable` being in effect, so I have added an additional check for it. I also added a simple regression test case. Reviewers: grimar, ruiu, emaste, espindola Reviewed By: ruiu Subscribers: arichardson, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D53515 ------------------------------------------------------------------------ llvm-svn: 345739
* Merging r343669:Tom Stellard2018-10-311-1/+2
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r343669 | grimar | 2018-10-03 02:59:08 -0700 (Wed, 03 Oct 2018) | 6 lines [ELF] - Fix BB after r343668 This stops testing the value of .rela.plt section offset. Also makes _start global to eliminate 'cannot find entry symbol _start' warning. ------------------------------------------------------------------------ llvm-svn: 345732
* Merging r344368:Tom Stellard2018-10-224-5/+98
| | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344368 | ruiu | 2018-10-12 10:07:32 -0700 (Fri, 12 Oct 2018) | 10 lines [lld] Add more complete support for the INCLUDE command. Patch by Ian Tessier. This change adds INCLUDE support to the MEMORY and SECTION commands, and to output sections, as per: https://sourceware.org/binutils/docs/ld/File-Commands.html#File-Commands Differential Revision: https://reviews.llvm.org/D52951 ------------------------------------------------------------------------ llvm-svn: 344926
* Merging r343668:Tom Stellard2018-10-222-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r343668 | grimar | 2018-10-03 02:33:00 -0700 (Wed, 03 Oct 2018) | 20 lines [ELF] - Do not forget to include to .dymsym symbols that were converted to Defined. This is the fix for "Bug 39104 - LLD links incorrect ELF executable if version script contains "local: *;" (https://bugs.llvm.org/show_bug.cgi?id=39104). The issue happens when we have non-PIC program call to function in a shared library. (for example, the PR above has R_X86_64_PC32 relocation against __libc_start_main) LLD converts symbol to Defined in that case with the use of replaceWithDefined() The issue is that after above we create a broken relocation because do not include the symbol into .dynsym. That happens when the version script is used because we treat the symbol as STB_LOCAL if the following condition match: VersionId == VER_NDX_LOCAL && isDefined() and do not include it to .dynsym because of that. Patch fixes the issue. Differential revision: https://reviews.llvm.org/D52724 ------------------------------------------------------------------------ llvm-svn: 344925
* Merging r344264:Tom Stellard2018-10-222-1/+27
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344264 | mstorsjo | 2018-10-11 10:45:51 -0700 (Thu, 11 Oct 2018) | 8 lines [COFF] Set proper pointer size alignment for LocalImportChunk When these are accessed with load/store instructions on ARM64, it becomes strictly necessary to have them properly aligned. This fixes PR39228. Differential Revision: https://reviews.llvm.org/D53128 ------------------------------------------------------------------------ llvm-svn: 344920
* Update release notes for lld 7.Rui Ueyama2018-09-131-7/+18
| | | | llvm-svn: 342187
* Clarify the wording for the state of the lld/MinGW targetMartin Storsjo2018-09-111-2/+2
| | | | llvm-svn: 341976
* Update release notes to say that lld/MinGW is production-ready.Rui Ueyama2018-09-111-3/+4
| | | | llvm-svn: 341936
* ReleaseNotes: fixesHans Wennborg2018-09-111-11/+11
| | | | llvm-svn: 341913
* Update release notes for lld 7.0.Rui Ueyama2018-09-111-9/+70
| | | | llvm-svn: 341890
* Merging r341670 and r341672:Hans Wennborg2018-09-101-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r341670 | tstellar | 2018-09-07 17:42:01 +0200 (Fri, 07 Sep 2018) | 15 lines MachO: Fix out-of-bounds memory access in getString16 Summary: This fixes the following tests when gcc is compiled with gcc8: lld :: mach-o/do-not-emit-unwind-fde-arm64.yaml lld :: mach-o/eh-frame-relocs-arm64.yaml llvm.org/PR38096 Reviewers: lhames, kledzik, javed.absar Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D51547 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r341672 | tstellar | 2018-09-07 17:51:52 +0200 (Fri, 07 Sep 2018) | 3 lines MachO: Change getString16() back to inline function This was accidentally changed in r341670. ------------------------------------------------------------------------ llvm-svn: 341780
* ReleaseNotes: tidy up for the releaseHans Wennborg2018-09-071-11/+1
| | | | llvm-svn: 341662
* Merging r339253:Hans Wennborg2018-09-046-0/+6
| | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339253 | psmith | 2018-08-08 16:50:33 +0200 (Wed, 08 Aug 2018) | 7 lines Add missing REQUIRES x86 to tests. Add REQUIRES to tests that fail when an x86 backend is not present. Differential Revision: https://reviews.llvm.org/D50440 ------------------------------------------------------------------------ llvm-svn: 341367
* Merging r338877, r338911 and r339165:Hans Wennborg2018-08-306-62/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338877 | nico | 2018-08-03 14:00:12 +0200 (Fri, 03 Aug 2018) | 19 lines lld-link: Fix subsystem inference for non-console apps on 32-bit, and fix entry point inference on 32-bit with /nodefaultlib LinkerDriver::inferSubsystem() used to do Symtab->findUnderscore("WinMain"), but WinMain is stdcall in 32-bit and is hence is called _WinMain@16. Instead, Symtab->findMangle(mangle("WinMain")) needs to be called. But since LinkerDriver::inferSubsystem() and LinkerDriver::findDefaultEntry() both need to call this, introduce a common helper function for this and call it from both places. (Also call it for "main" for consistency, even though findUnderscore() is enough for main since that's __cdecl on 32-bit). This also exposed a bug for /nodefaultlib entrypoint inference: The code here called findMangle(Sym) instead of findMangle(mangle(Sym)), again doing the wrong thing on 32-bit. Fix that too. While here, make Driver::mangle() a static free function. https://reviews.llvm.org/D50184 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r338911 | nico | 2018-08-03 20:32:44 +0200 (Fri, 03 Aug 2018) | 7 lines lld-link: Simplify LinkerDriver::findDefaultEntry() No intended behavior change. Not repeating the CRTStartup names makes fixing PR36523 simpler. https://reviews.llvm.org/D50253 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r339165 | nico | 2018-08-07 21:10:28 +0200 (Tue, 07 Aug 2018) | 26 lines lld-link: Take /SUBSYSTEM into account for automatic /ENTRY detection. If /subsystem:windows is passed, link.exe only looks for WinMain and wWinMain, and if /subsystem:console is passed it only looks for main and wmain. lld-link used to look for all 4 in both cases. This patch makes lld-link match link.exe's behavior. This requires that the subsystem is known by the time findDefaultEntry() gets called. findDefaultEntry() is called before the main link loop, so that the loop can mark the entry point as undefined. That means inferSubsystem() has to be called above the main loop as well. This in turn means /subsystem: from .drectve sections only has an effect on entry point inference for obj files passed to lld-link directly (and not in obj files found later in .lib files). link.exe seems to ignore /subsystem: for obj files from lib files completely (while in lld it's ignored only for entry point detection but it still overrides /subsystem: flags passed on the command line for the value that gets written in the output file). Also, if the subsytem isn't needed (e.g. when only writing a /def: lib file and not writing a coff file), link.exe doesn't complain if the subsystem isn't known, so both subsystem and entry point handling should be below the early return lld has for that case. Fixes PR36523. https://reviews.llvm.org/D50316 ------------------------------------------------------------------------ llvm-svn: 341035
* [docs][mips] Add MIPS specific release notes for LLD 7.0Simon Atanasyan2018-08-281-1/+9
| | | | | | Differential revision: https://reviews.llvm.org/D51309 llvm-svn: 340803
* Merging r339904:Hans Wennborg2018-08-172-4/+10
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339904 | maskray | 2018-08-16 19:22:02 +0200 (Thu, 16 Aug 2018) | 11 lines [ELF] mergeSections: remove non-alive MergeInputSection Summary: This makes it conform to what the comment says. Otherwise when getErrPlace() is called afterwards, cast<InputSection>(D) will cause incompatible cast as MergeInputSection is not a subclass of InputSection. Reviewers: ruiu, grimar, espindola, pcc Reviewed By: grimar Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D50742 ------------------------------------------------------------------------ llvm-svn: 339986
* Merging r339049:Hans Wennborg2018-08-143-3/+43
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339049 | mstorsjo | 2018-08-06 21:49:18 +0200 (Mon, 06 Aug 2018) | 8 lines [COFF] Remove a superfluous warning about aligncomm for non-common symbols It's not an error if a common symbol (uninitialized data, with alignment specified via the aligncomm directive) is replaced with a regular one with initialized data (with alignment specified via the section chunk). Differential Revision: https://reviews.llvm.org/D50268 ------------------------------------------------------------------------ llvm-svn: 339658
* Merging r339075:Hans Wennborg2018-08-143-3/+3
| | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339075 | stella.stamenova | 2018-08-07 00:37:49 +0200 (Tue, 07 Aug 2018) | 12 lines [lit, python] Always add quotes around the python path in lit Summary: The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes. This is a companion change to: https://reviews.llvm.org/D50206 Reviewers: asmith, zturner, espindola Subscribers: emaste, sbc100, arichardson, aheejin, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D50282 ------------------------------------------------------------------------ llvm-svn: 339656
* [ReleaseNotes] Mention noteworthy changes for 7.0Martin Storsjo2018-08-141-1/+7
| | | | llvm-svn: 339648
* Merging r339058:Hans Wennborg2018-08-074-6/+172
| | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339058 | mstorsjo | 2018-08-06 23:26:09 +0200 (Mon, 06 Aug 2018) | 16 lines [COFF] Treat .xdata/.pdata$<sym> as implicitly associative to <sym> for MinGW MinGW configurations don't use associative comdats, as GNU ld doesn't support that. Instead they produce normal comdats named .text$sym, .xdata$sym and .pdata$sym. GNU ld doesn't discard any comdats starting with .xdata or .pdata, even if --gc-sections is used (while it does discard other unreferenced comdats), regardless of what symbol name is used after the $ separator. For LLD, treat any such comdat as implicitly associative to the base symbol. This requires maintaining a map from symbol name to section number, but that is only maintained when the MinGW flag has been enabled. Differential Revision: https://reviews.llvm.org/D49700 ------------------------------------------------------------------------ llvm-svn: 339108
* Merging r338679, r338684, r338697, r338699:Hans Wennborg2018-08-068-14/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338679 | grimar | 2018-08-02 10:07:07 +0200 (Thu, 02 Aug 2018) | 10 lines [LLD] - Improve handling of AT> linker script commands Patch by Konstantin Schwarz! The condition to create a new phdr must also check the usage of "AT>" linker script command, and create a new PT_LOAD header if a new LMARegion is used. This fixes PR38307 Differential revision: https://reviews.llvm.org/D50052 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r338684 | grimar | 2018-08-02 10:13:56 +0200 (Thu, 02 Aug 2018) | 9 lines [LLD] Only increase LMARegion if different from MemRegion Patch by Konstantin Schwarz! If both the MemRegion and LMARegion are set for an output section in a linker script, we should only increase the LMARegion if it is different from the MemRegion. Otherwise, we reserve the memory twice. Differential revision: https://reviews.llvm.org/D50065 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r338697 | grimar | 2018-08-02 12:45:46 +0200 (Thu, 02 Aug 2018) | 9 lines [LLD] Do not overwrite LMAOffset of PT_LOAD header Patch by Konstantin Schwarz! If more than a single output section is added to a PT_LOAD header, only the first section should set the LMAOffset of the segment. Otherwise, we get a load-address overlap error Differential revision: https://reviews.llvm.org/D50133 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r338699 | grimar | 2018-08-02 12:59:28 +0200 (Thu, 02 Aug 2018) | 5 lines [LLD][ELF] - Simplify. NFC. isHeaderSection can be useful I believe, but probably not right now and not for this case. ------------------------------------------------------------------------ llvm-svn: 339000
* Test CommitOwen Reynolds2018-08-011-1/+0
| | | | | | Removal of extra line llvm-svn: 338533
* [LLD][ELF] - Apply clang-format to InputSections.cpp. NFC.George Rimar2018-08-011-3/+3
| | | | llvm-svn: 338498
* [LLD][ELF] - Removed excessive llvm:: prefix. NFC.George Rimar2018-08-011-6/+4
| | | | llvm-svn: 338497
* Allow oformat to accept format starting with elf as acceptable format. ↵Rumeet Dhindsa2018-07-312-0/+4
| | | | | | | | | | isOutputFormatBinary returns false in such case. Example: --oformat elf64-x86-64 Differential Revision: https://reviews.llvm.org/D50105 llvm-svn: 338445
* [lld] Fix test RUN commands so they don't fail when run in a read-only ↵David L. Jones2018-07-311-6/+6
| | | | | | | | | | filesystem. Some test setups run tests in a read-only path, which means that opening the default output path (a.out) for write will fail. This change adds appropriate -o flags so the tests will not fail spuriously. llvm-svn: 338440
* ELF: Add libcall symbols to the link when LTO is being used.Peter Collingbourne2018-07-313-3/+45
| | | | | | | | | | | | If any of our inputs are bitcode files, the LTO code generator may create references to certain library functions that might not be explicit in the bitcode file's symbol table. If any of those library functions are defined in a bitcode file in an archive member, we need to arrange to use LTO to compile those archive members by adding them to the link beforehand. Differential Revision: https://reviews.llvm.org/D50017 llvm-svn: 338434
* Simplify. NFC.Rui Ueyama2018-07-312-3/+2
| | | | llvm-svn: 338409
* Make ICF log output order deterministic.Rui Ueyama2018-07-312-9/+3
| | | | | | | | | | This patch does the same thing as r338153 for COFF. Note that this patch affects only the order of log messages. The output file is already deterministic. Differential Revision: https://reviews.llvm.org/D50023 llvm-svn: 338406
* [LLD][ELF] - ICF: Check we do not fold sections which relocations reffering ↵George Rimar2018-07-312-0/+24
| | | | | | | | | | | to absolute symbols with a different values. This adds a test for the following uncovered piece of code: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L263 Without that lines we would crash. llvm-svn: 338379
* [ELF][ARM] Implement support for Tag_ABI_VFP_argsPeter Smith2018-07-3111-1/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Tag_ABI_VFP_args build attribute controls the procedure call standard used for floating point parameters on ARM. The values are: 0 - Base AAPCS (FP Parameters passed in Core (Integer) registers 1 - VFP AAPCS (FP Parameters passed in FP registers) 2 - Toolchain specific (Neither Base or VFP) 3 - Compatible with all (No use of floating point parameters) If the Tag_ABI_VFP_args build attribute is missing it has an implicit value of 0. We use the attribute in two ways: - Detect a clash in calling convention between Base, VFP and Toolchain. we follow ld.bfd's lead and do not error if there is a clash between an implicit Base AAPCS caused by a missing attribute. Many projects including the hard-float (VFP AAPCS) version of glibc contain assembler files that do not use floating point but do not have Tag_ABI_VFP_args. - Set the EF_ARM_ABI_FLOAT_SOFT or EF_ARM_ABI_FLOAT_HARD ELF header flag for Base or VFP AAPCS respectively. This flag is used by some ELF loaders. References: - Addenda to, and Errata in, the ABI for the ARM Architecture for Tag_ABI_VFP_args - Elf for the ARM Architecture for ELF header flags Fixes PR36009 Differential Revision: https://reviews.llvm.org/D49993 llvm-svn: 338377
* [LLD][ELF] - ICF: add test case testing we do not fold sections with the ↵George Rimar2018-07-311-0/+15
| | | | | | | | | | | different flags. NFCI. Previously the following condition was not tested at all: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L300 Patch adds a test for `A->Flags != B->Flags` part. llvm-svn: 338375
* windows_support.rst: Add links for downloadingHans Wennborg2018-07-311-0/+7
| | | | llvm-svn: 338363
* index.rst: pe/coff does support pdbs nowHans Wennborg2018-07-311-1/+1
| | | | llvm-svn: 338362
* [docs] Sort ld.lld.1 optionsFangrui Song2018-07-301-43/+43
| | | | | | | | | | Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50022 llvm-svn: 338326
* [docs] Add missing options to ld.lld.1Fangrui Song2018-07-301-24/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D49938 llvm-svn: 338320
* [docs] Update ld.lld.1Fangrui Song2018-07-302-4/+10
| | | | llvm-svn: 338275
* [AArch64] Support execute-only LOAD segments.David Bolvansky2018-07-306-0/+62
| | | | | | | | | | | | | | | | | | | Summary: This adds an LLD flag to mark executable LOAD segments execute-only for AArch64 targets. In AArch64 the expectation is that code is execute-only compatible, so this just adds a linker option to enforce this. Patch by: ivanlozano (Ivan Lozano) Reviewers: srhines, echristo, peter.smith, eugenis, javed.absar, espindola, ruiu Reviewed By: ruiu Subscribers: dokyungs, emaste, arichardson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D49456 llvm-svn: 338271
* [ELF] - Implement SHT_SYMTAB_SHNDX (.symtab_shndxr) section.George Rimar2018-07-305-35/+109
| | | | | | | | | | | | | | | | This is relative to https://bugs.llvm.org//show_bug.cgi?id=38119. SHT_SYMTAB section is able to keep symbols with output section indices up to 0xff00 (SHN_LORESERVE). But if we have indices that are greater than that (PR shows that it might happen), we need to use SHT_SYMTAB_SHNDX extended section. It was not supported by LLD. Description of the SHT_SYMTAB_SHNDX section is here: https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-94076/index.html. Differential revision: https://reviews.llvm.org/D49541 llvm-svn: 338247
* [ELF][HEXAGON] Add R_HEX_32_6_X and R_HEX_12_XSid Manning2018-07-292-0/+13
| | | | | | And add a test. llvm-svn: 338213
* Reland r338088, "ELF: Make --print-icf-sections output deterministic."Peter Collingbourne2018-07-272-32/+27
| | | | | | | | | | | | | | | | | | | | The xxHash64 function has been made unsigned-char-independent, so we can reland this change now. Original commit message: > The icf-safe.s test currently fails on 32-bit platforms because it uses > the --print-icf-sections flag and depends on the output appearing in > a specific order. However, this flag causes the output to depend on > the order of the sections in the Sections array, which depends on the > hash values returned from hash_combine, which happen to be different > for that test between 32-bit and 64-bit platforms. > > This change makes the output deterministic by using xxHash64 instead of > hash_combine. Differential Revision: https://reviews.llvm.org/D49877 llvm-svn: 338153
* Revert "ELF: Make --print-icf-sections output deterministic."Ilya Biryukov2018-07-272-23/+28
| | | | | | | This reverts commit r338088. To unbreak our integrate. The resulting lld output is different if compiled with '-funsigned-char'. llvm-svn: 338110
* ELF: Make --print-icf-sections output deterministic.Peter Collingbourne2018-07-262-28/+23
| | | | | | | | | | | | | | | | The icf-safe.s test currently fails on 32-bit platforms because it uses the --print-icf-sections flag and depends on the output appearing in a specific order. However, this flag causes the output to depend on the order of the sections in the Sections array, which depends on the hash values returned from hash_combine, which happen to be different for that test between 32-bit and 64-bit platforms. This change makes the output deterministic by using xxHash64 instead of hash_combine. Differential Revision: https://reviews.llvm.org/D49877 llvm-svn: 338088
* [COFF] Handle comdat sections without leader symbolsMartin Storsjo2018-07-262-0/+28
| | | | | | | | | | | | | | | | | Discard them unless they have been associated by other means (yet uimplemented). According to MS link.exe, such sections are illegal, but MinGW setups use them in their take on associative comdats. This avoids leaving references to the bogus SectionChunk* PendingComdat, which cannot be dereferenced. This fixes PR38183. Differential Revision: https://reviews.llvm.org/D49653 llvm-svn: 338064
* [COFF] clean up global resources after completionRui Ueyama2018-07-261-0/+3
| | | | | | | | | | | | | Patch by Andrew Kelley. Previously, running lld::coff::link() twice in the same process would access stale pointers because of these global variables not being reset. After this patch, lld::coff::link() can be called any number of times, just like its ELF and MACH-O counterparts. Differential Revision: https://reviews.llvm.org/D49856 llvm-svn: 338042
* [ELF] Fix linker-script-in-search-path.sFangrui Song2018-07-251-3/+3
| | | | llvm-svn: 337983
* [ELF] Make linker-script-in-search-path.s robust per r337972Fangrui Song2018-07-251-2/+2
| | | | llvm-svn: 337975
* Make a test more robust.Rui Ueyama2018-07-251-3/+3
| | | | | | | Previously, this test fails if there's other test that happens to create "t.script" in the current directory. llvm-svn: 337972
* [ELF] Use search paths for --version-script=Fangrui Song2018-07-255-9/+23
| | | | | | | | | | | | Summary: This behavior matches ld.bfd -Ld --version-script=t.script a.o Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D49820 llvm-svn: 337969
* ELF: Do not ICF SHF_LINK_ORDER sections.Peter Collingbourne2018-07-252-0/+23
| | | | | | | | | | | | | | | | | | We are already ICF'ing these sections as a unit with their dependent sections, so they don't need to be considered for ICF individually. This change also "fixes" slowness caused by our quadratic-in-group-size relocation segregation algorithm on 32-bit ARM platforms with unwind data and ICF on rodata. In this scenario almost every function's .ARM.exidx is identical except for the targets of the relocations that refer to the function and its .ARM.extab, which causes almost all of the program's .ARM.exidx sections to be initially added to the same class, which causes us to compare every such section with every other such section. Differential Revision: https://reviews.llvm.org/D49716 llvm-svn: 337967
OpenPOWER on IntegriCloud