summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix test to unconditionally create a GNU-format archive.Eli Friedman2019-03-121-1/+1
| | | | | | | On Darwin targets, llvm-ar creates a Darwin format archive by default, which ld.lld can't read, so it was printing an unexpected error. llvm-svn: 355894
* ELF: Remove dead code. NFCI.Peter Collingbourne2019-03-121-3/+1
| | | | | | | | The Live bit is already set to false by SectionBase. Differential Revision: https://reviews.llvm.org/D59052 llvm-svn: 355893
* [ELF] Print a better error for an archive containing a non-ELF file.Eli Friedman2019-03-122-8/+17
| | | | | | | | | Hopefully gives a more readable error message for the most obvious mistake. Differential Revision: https://reviews.llvm.org/D59170 llvm-svn: 355888
* Include an archive file name in an error message for a corrupted file.Rui Ueyama2019-03-122-9/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D59212 llvm-svn: 355886
* lld-link: Only print demangled symbol names by defaultNico Weber2019-03-116-13/+24
| | | | | | | | | | | | | | | | | | This makes lld-link's output a bit more concise. Since most developers can't read mangled names, this should make the output a bit easier to understand as well. It also makes lld-link's output consistent with ld.lld's output. (link.exe prints both demangled and mangled names; lld-link used to match link.exe output but now no longer does.) For people working on toolchains, add a `/demangle:no` flag that makes lld-link print the mangled name instead of the demangled name. (If desired, people could pipe that through `demumble -b` to get the old behavior of both demangled and mangled output.) Differential Revision: https://reviews.llvm.org/D58132 llvm-svn: 355878
* [PGO] Add options for context-sensitive PGORong Xu2019-03-114-0/+15
| | | | | | | | Add lld options for CSPGO (context-sensitive PGO). Differential Revision: https://reviews.llvm.org/D56675 llvm-svn: 355876
* Fail early if an output file is not writableRui Ueyama2019-03-118-13/+19
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=36478 Differential Revision: https://reviews.llvm.org/D43664 llvm-svn: 355834
* [LLD] Fixed flaky unit test based on build directory.Mitch Phillips2019-03-081-0/+1
| | | | | | | | | | This unit test fails if 'zed' appears in your build path, as lld is echoing out the path of the source file. Change the unit test to explicitly only match everything after the 'Symbols [' line of the output, to make sure that this test doesn't inadvertently fail due to the build path. llvm-svn: 355748
* [WebAssembly] Don't mark lazy symbols as `IsUsedInRegularObj`Sam Clegg2019-03-084-8/+14
| | | | | | | | | | | This matches the ELF does. Update the comment in ELF/Symbols.h and duplicate it in wasm/Symbols.h This a followup on rL355580 and rL355577. Differential Revision: https://reviews.llvm.org/D59075 llvm-svn: 355737
* ELF: Reduce the size of InputSectionBase by two words. NFCI.Peter Collingbourne2019-03-071-21/+21
| | | | | | | | | | | | - The Assigned bit was previously taking a word on its own. Move it into the bit fields in SectionBase. - NumRelocations and AreRelocsRela were previously also taking up a word despite only using half of it. Move them into the alignment gap after SectionBase's fields. Differential Revision: https://reviews.llvm.org/D59044 llvm-svn: 355622
* fix expected format in test/ELF/eh-frame-hdr-augmentation.sPetar Jovanovic2019-03-071-2/+2
| | | | | | | Follow-up for r355605. Fix expected format in test/ELF/eh-frame-hdr-augmentation.s llvm-svn: 355621
* [LLD][COFF] Restrict the failifmismatch test to x86_64-windows-msvc because ↵Alexandre Ganea2019-03-071-2/+4
| | | | | | the ELF container doesn't support llvm.linker.options meta-data with only one operand. llvm-svn: 355602
* [LLD][COFF] Attempt fix for failifmismatch test on aarch64-only builder.Alexandre Ganea2019-03-072-29/+14
| | | | | | Shall fix: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/6150 llvm-svn: 355595
* [WebAssembly] Fix build after rL355577Sam Clegg2019-03-071-1/+1
| | | | | | | | Turns own that IsUsedInRegularObject is set for lazy (archive) symbols. Differential Revision: https://reviews.llvm.org/D59074 llvm-svn: 355580
* [WebAssembly] LTO: Don't include bitcode-only symbols in the symtabSam Clegg2019-03-073-1/+30
| | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=40654 Differential Revision: https://reviews.llvm.org/D59012 llvm-svn: 355577
* [LLD][COFF] More detailed information for /failifmismatchAlexandre Ganea2019-03-068-26/+98
| | | | | | | | | | | | | | When mismatched #pragma detect_mismatch declarations occur, now print the conflicting OBJs. lld-link: error: /failifmismatch: mismatch detected for 'TEST': >>> test.obj has value 1 >>> test2.obj has value 2 Fixes PR38579 Differential Revision: https://reviews.llvm.org/D58910 llvm-svn: 355543
* [LLD][ELF] - Convert common-symbol-alignment.s test to yaml.George Rimar2019-03-064-12/+36
| | | | | | This removes 2 precompiled binaries from the inputs. llvm-svn: 355500
* [LLD][ELF] - Remove unused invalid input object. NFC.George Rimar2019-03-061-0/+0
| | | | | | | | It was introduced by me in 2016: r290335, but the test did contain the YAML from start, I think it was committed by mistake. llvm-svn: 355497
* ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.Peter Collingbourne2019-03-065-20/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D58810 llvm-svn: 355479
* ELF: Extract a non-ELFT base class for VersionNeedSection.Peter Collingbourne2019-03-064-42/+35
| | | | | | | | | | | We're going to need a separate VersionNeedSection for each partition, and the partition data structure won't be templated. With this the VersionTableSection class no longer needs ELFT, so detemplate it. Differential Revision: https://reviews.llvm.org/D58808 llvm-svn: 355478
* [WebAssembly] Test change after disabling MachineBlockPlacementHeejin Ahn2019-03-051-1/+1
| | | | | | | | | | | | | | | | Summary: We disabled MachineBlockPlacement pass in D58953, and this test result changes as the result of it. Reviewers: kripken Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58954 llvm-svn: 355438
* [ELF][test] chmod u+w to prevent annoying rm promptFangrui Song2019-03-051-1/+2
| | | | | | | | If the permission does not permit writing and the standard input is a terminal, rm gives an annoying prompt. chmod u+w to make the output directory easier to delete. llvm-svn: 355382
* [LLD] add test for line number info related to differrent .text sectionsAlexey Lapshin2019-03-041-0/+177
| | | | | | | | | | | There is a bug for llvm-objdump which incorrectly reported line number info for object file if several .text sections presented. https://bugs.llvm.org/show_bug.cgi?id=40703 . This patch adds test for the same situation. Differential revision: https://reviews.llvm.org/D58357 llvm-svn: 355306
* [WebAssembly] Fix crash when __wasm_call_ctor is GCd in programs containing ↵Sam Clegg2019-03-022-0/+51
| | | | | | | | | | | | static init/fini Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58864 llvm-svn: 355263
* [WebAssebmly] Allow __wasm_call_ctors to be GC'edSam Clegg2019-03-0129-479/+239
| | | | | | Differential Revision: https://reviews.llvm.org/D58806 llvm-svn: 355240
* ELF: Change FileSize back to a uint64_t.Peter Collingbourne2019-03-014-3/+18
| | | | | | | | | This lets us detect file size overflows when creating a 64-bit binary on a 32-bit machine. Differential Revision: https://reviews.llvm.org/D58840 llvm-svn: 355218
* [lld][test] Fix tests. llvm-readobj now emits symbol section names.Matt Davis2019-03-012-2/+2
| | | | | | | This is the result of patch 99e9c4cad08164b9c0ca565ab9ad48ce132e98e5 See the related patch https://reviews.llvm.org/D58796 llvm-svn: 355211
* [LLD][ELF] - Convert 3 testcases to use yaml instead of binaries.George Rimar2019-03-015-13/+59
| | | | | | | | This change makes 3 tests to use yaml instead of binaries. Differential revision: https://reviews.llvm.org/D58780 llvm-svn: 355196
* [ELF][ARM] Fix clang-armv7-linux-build-cache builds of LLD [NFC]Peter Smith2019-03-011-1/+1
| | | | | | | | r355153 introduced a build failure on a build bot that uses clang natively on an armv7-a machine. This a temporary fix to use size_t rather than uint64_t. llvm-svn: 355195
* [LLD][ELF] - Convert invalid/undefined-local-symbol-in-dso.test to use YAMLGeorge Rimar2019-03-012-56/+17
| | | | | | | | This removes a binary from the inputs and reduces the test case. Differential revision: https://reviews.llvm.org/D58783 llvm-svn: 355194
* [ELF] Explain some options in ld.lld.1Fangrui Song2019-03-011-3/+60
| | | | | | | | | | | | | | Reviewers: ruiu, grimar Reviewed By: ruiu Subscribers: srhines, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58669 llvm-svn: 355173
* ELF: Write .eh_frame_hdr explicitly after writing .eh_frame.Peter Collingbourne2019-02-287-40/+57
| | | | | | | | | | | This lets us remove the special case from Writer::writeSections(), and also fixes a bug where .eh_frame_hdr isn't necessarily written in the correct order if a linker script moves .eh_frame and .eh_frame_hdr into the same output section. Differential Revision: https://reviews.llvm.org/D58795 llvm-svn: 355153
* [COFF] Add address-taken import thunks to the fid tableReid Kleckner2019-02-282-11/+82
| | | | | | | | | | | | | | Summary: Fixes PR39799 Reviewers: dmajor, hans Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58739 llvm-svn: 355141
* [WebAssembly] Remove uses of ThreadModelThomas Lively2019-02-283-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In the clang UI, replaces -mthread-model posix with -matomics as the source of truth on threading. In the backend, replaces -thread-model=posix with the atomics target feature, which is now collected on the WebAssemblyTargetMachine along with all other used features. These collected features will also be used to emit the target features section in the future. The default configuration for the backend is thread-model=posix and no atomics, which was previously an invalid configuration. This change makes the default valid because the thread model is ignored. A side effect of this change is that objects are never emitted with passive segments. It will instead be up to the linker to decide whether sections should be active or passive based on whether atomics are used in the final link. Reviewers: aheejin, sbc100, dschuff Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, steven_wu, dexonsmith, rupprecht, jfb, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D58742 llvm-svn: 355112
* [LLD][ELF] - Stop using binary input in invalid/tls-symbol.s test. NFCI.George Rimar2019-02-282-3/+22
| | | | | | We can use yaml2obj instead, patch does this. llvm-svn: 355075
* [LLD][COFF] Support /threads[:no] like the ELF driverAlexandre Ganea2019-02-277-15/+33
| | | | | | Differential review: https://reviews.llvm.org/D58594 llvm-svn: 355029
* [DebugInfo] add SectionedAddress to DebugInfo interfaces.Alexey Lapshin2019-02-271-2/+13
| | | | | | | | | | | | | | | | | That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703 "wrong line number info for obj file compiled with -ffunction-sections" bug. The problem happened with only .o files. If object file contains several .text sections then line number information showed incorrectly. The reason for this is that DwarfLineTable could not detect section which corresponds to specified address(because address is the local to the section). And as the result it could not select proper sequence in the line table. The fix is to pass SectionIndex with the address. So that it would be possible to differentiate addresses from various sections. With this fix llvm-objdump shows correct line numbers for disassembled code. Differential review: https://reviews.llvm.org/D58194 llvm-svn: 354972
* [LLD][ELF] - Improve "sh_addralign is not a power of 2" diagnostics.George Rimar2019-02-273-6/+17
| | | | | | | | | | This patch removes the precompiled binary from inputs, replacing it with a YAML. And teaches LLD to report a section name in case of such error. Differential revision: https://reviews.llvm.org/D58670 llvm-svn: 354959
* Output ELF files after ThinLTO is run.Bill Wendling2019-02-263-12/+57
| | | | | | | | | | | | | | | | | | Summary: The gold linker allowed you to output the ELF files after LTO was run. It did it by using the 'obj-path' option. This replicates that behavior. Reviewers: espindola, ruiu, MaskRay, pcc Reviewed By: MaskRay, pcc Subscribers: grimar, emaste, inglorion, arichardson, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D56046 llvm-svn: 354917
* [mips] Reduce number of tools invocations in the test. NFCSimon Atanasyan2019-02-251-74/+41
| | | | llvm-svn: 354772
* [ELF][ARM] Accept and ignore -p and -no-pipleline-knowledgePeter Smith2019-02-252-0/+4
| | | | | | | | | | | | The linux kernel uses an old flag -p/-no-pipeline-knowledge that is accepted by bfd and gold but ignored by modern versions of them. The original option is very old and is pre-ABI, it sometimes comes up in code-bases that had support for pre ABI toolchains. The Linux kernel uses it in 3 places in the ARM specific section. Differential Revision: https://reviews.llvm.org/D58540 llvm-svn: 354769
* [LLD][COFF] Add support for /FUNCTIONPADMIN command-line optionAlexandre Ganea2019-02-2312-65/+314
| | | | | | | | | | Initial patch by Stefan Reinalter. Fixes PR36775 Differential Revision: https://reviews.llvm.org/D49366 llvm-svn: 354716
* Split a long line to avoid annoying horizontal scrolling on a browser.Rui Ueyama2019-02-231-1/+2
| | | | llvm-svn: 354707
* s/method/function/g since function is the correct name in C++.Rui Ueyama2019-02-221-12/+12
| | | | llvm-svn: 354704
* Remove a function from header and move the implementation to a .cpp file. NFC.Rui Ueyama2019-02-223-10/+6
| | | | llvm-svn: 354703
* [ELF][test]Remove unnecessary empty symbol references in yaml/add missing ↵James Henderson2019-02-228-7/+12
| | | | | | | | | | | | | | | | | | | symbols for relocs yaml2obj used to require the Symbol field in relocations, but it hasn't done so for a couple of years. Another change to yaml2obj will soon land that will look up the symbol by name or index, if present, and emit an error if not found. This will mean that an explicit symbol reference (even to an empty-named symbol) that does not reference a symbol declared in the yaml will result in an error. This patch updates tests that would otherwise start emitting errors. Reviewed by: ruiu, grimar Differential Revision: https://reviews.llvm.org/D58508 llvm-svn: 354666
* ELF: Remove dead code. NFCI.Peter Collingbourne2019-02-211-3/+2
| | | | | | | | | RelocationBaseSection is not used in -r links, so Config->Relocatable will always be false. Differential Revision: https://reviews.llvm.org/D58489 llvm-svn: 354607
* Update `ld.lld --version` string for monorepo.Rui Ueyama2019-02-212-25/+36
| | | | | | | | | | | | | | | | | This patch basically does the same thing as https://reviews.llvm.org/rL352729 did to clang. With this patch, lld now prints out a correct version string including a git commit id like this: $ bin/ld.lld --version LLD 9.0.0 (https://github.com/llvm/llvm-project.git c027658504fa9e68173f53dedaf223695a65e910) (compatible with GNU linkers) Fixes https://bugs.llvm.org/show_bug.cgi?id=40780 Differential Revision: https://reviews.llvm.org/D58411 llvm-svn: 354605
* [LLD][ELF] - Simplify test case. NFC.George Rimar2019-02-211-7/+0
| | | | | | It has an excessive section declaration. llvm-svn: 354573
* [WebAssembly] Remove redundant code added in rL354538. NFC.Sam Clegg2019-02-211-36/+4
| | | | | | | | | The code for encoding the symbols signature into its name was not actually being used in the final version of this change. Differential Revision: https://reviews.llvm.org/D58482 llvm-svn: 354539
OpenPOWER on IntegriCloud