summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] Add a spell corrector for "undefined symbol" diagnosticsFangrui Song2019-09-042-5/+149
| | | | | | | | | | | | | | | | | | | | | | | Non-undefined symbols with Levenshtein distance 1 or a transposition are suggestion candidates. This is probably good enough and it can suggest some missing/superfluous qualifiers: const, restrict, volatile, & and && ref-qualifier, e.g. error: undefined symbol: foo(int*) >>> referenced by b.o:(.text+0x1) +>>> did you mean: foo(int const*) +>>> defined in: a.o error: undefined symbol: foo(int*&) >>> referenced by b.o:(.text+0x1) +>>> did you mean: foo(int*) +>>> defined in: b.o Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D67039 llvm-svn: 370853
* reland "[lld-link] implement -start-lib and -end-lib"Bob Haarman2019-09-0315-70/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-land of r370487 with a fix for the use-after-free bug that rev contained. This implements -start-lib and -end-lib flags for lld-link, analogous to the similarly named options in ld.lld. Object files after -start-lib are included in the link only when needed to resolve undefined symbols. The -end-lib flag goes back to the normal behavior of always including object files in the link. This mimics the semantics of static libraries, but without needing to actually create the archive file. Reviewers: ruiu, smeenai, MaskRay Reviewed By: ruiu, MaskRay Subscribers: akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66848 llvm-svn: 370816
* ld.lld.1: explain long options may use one or two dashesEd Maste2019-09-031-0/+11
| | | | | | Obtained from FreeBSD r329003 llvm-svn: 370800
* ld.lld.1: stylistic changes suggested by igorEd Maste2019-09-031-23/+36
| | | | | | | | | igor is an automated man page "proofreader" from FreeBSD - see http://www.wonkity.com/~wblock/igor/igor.pdf No content change. llvm-svn: 370799
* [LLD] [COFF] Demangle itanium symbols in mingw modeMartin Storsjo2019-09-023-1/+84
| | | | | | Differential Revision: https://reviews.llvm.org/D67051 llvm-svn: 370654
* [ELF] Do not ICF two sections with different output sections (by SECTIONS ↵Fangrui Song2019-09-029-81/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands) Fixes PR39418. Complements D47241 (the non-linker-script case). processSectionCommands() assigns input sections to output sections. ICF is called before it, so .text.foo and .text.bar may be folded even if their output sections are made different by SECTIONS commands. ``` markLive<ELFT>() doIcf<ELFT>() // During ICF, we don't know the output sections writeResult() combineEhSections<ELFT>() script->processSectionCommands() // InputSection -> OutputSection assignment ``` This patch splits processSectionCommands() into processSectionCommands() and processSymbolAssignments(), and moves processSectionCommands() before ICF: ``` markLive<ELFT>() combineEhSections<ELFT>() script->processSectionCommands() doIcf<ELFT>() // should remove folded input sections writeResult() script->processSymbolAssignments() ``` An alternative approach is to unfold a section `sec` in processSectionCommands() when we find `sec` and `sec->repl` belong to different output sections. I feel this patch is superior because this can fold more sections and the decouple of SectionCommand/SymbolAssignment gives flexibility: * An ExprValue can't be evaluated before its section is assigned to an output section -> we can delete getOutputSectionVA and simplify another place where we had to check if the output section is null. Moreover, a case in linkerscript/early-assign-symbol.s can be handled now. * processSectionCommands/processSymbolAssignments can be freely moved around. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66717 llvm-svn: 370635
* [ELF] Align SHT_LLVM_PART_EHDR to a maximum page size boundaryFangrui Song2019-09-022-10/+25
| | | | | | | | | | | | | | | | | | | | | Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=998712 SHT_LLVM_PART_EHDR marks the start of a partition. The partition sections will be extracted to a separate file. Align to the next maximum page size boundary so that we can find the ELF header at the start. We cannot benefit from overlapping p_offset ranges with the previous segment anyway. It seems we lack some llvm-objcopy --extract-main-partition and --extract-partition sanity checks. It may place EHDR at the start even if p_offset if non zero. Anyway, the lld change is justified for the reasons above. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D67032 llvm-svn: 370629
* Revert "[lld-link] implement -start-lib and -end-lib"Vlad Tsyrklevich2019-08-3015-316/+70
| | | | | | | This reverts commit r370487 as it is causing ASan/MSan failures on sanitizer-x86_64-linux-fast llvm-svn: 370550
* [lld][WebAssembly] Fix spurious signature mismatch warningsSam Clegg2019-08-302-2/+17
| | | | | | | | | | | | | | | | | | | Summary: This a follow up on: https://reviews.llvm.org/D62153 Handle the case where there are multiple object files that contain undefined references to the same function. We only generate a function variant if the existing symbol is directly called. See: https://github.com/emscripten-core/emscripten/issues/8995 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67015 llvm-svn: 370509
* [LLD] [COFF] Add a missing REQUIRES line to a recently added test. NFC.Martin Storsjo2019-08-301-0/+2
| | | | | | | This should fix failing buildbots like http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/7180. llvm-svn: 370491
* [lld-link] implement -start-lib and -end-libBob Haarman2019-08-3015-70/+316
| | | | | | | | | | | | | | | | | | | | | | | Summary: This implements -start-lib and -end-lib flags for lld-link, analogous to the similarly named options in ld.lld. Object files after -start-lib are included in the link only when needed to resolve undefined symbols. The -end-lib flag goes back to the normal behavior of always including object files in the link. This mimics the semantics of static libraries, but without needing to actually create the archive file. Reviewers: ruiu, smeenai, MaskRay Reviewed By: ruiu, MaskRay Subscribers: akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66848 llvm-svn: 370487
* [ELF] Set `referenced` bit of Undefined created by BitcodeFileFangrui Song2019-08-303-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | D64136 and D65584, while fixing STB_WEAK issues and improving our compatibility with ld.bfd, can cause another STB_WEAK problem related to LTO: If %tundef.o has an undefined reference on f, and %tweakundef.o has a weak undefined reference on f, %tdef.o has a definition of f ``` ld.lld %tundef.o %tweakundef.o --start-lib %tdef.o --end-lib ``` 1) `%tundef.o` doesn't set the `referenced` bit. 2) `%weakundef.o` changes the binding from STB_GLOBAL to STB_WEAK 3) `%tdef.o` is not fetched because the binding is weak. Step (1) is incorrect. This patch sets the `referenced` bit of Undefined created by bitcode files. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66992 llvm-svn: 370437
* [LLD] [COFF] Support merging resource object filesMartin Storsjo2019-08-3010-43/+335
| | | | | | | | | | | | | | | | | | | | | | | | Extend WindowsResourceParser to support using a ResourceSectionRef for loading resources from an object file. Only allow merging resource object files in mingw mode; keep the existing error on multiple resource objects in link mode. If there only is one resource object file and no .res resources, don't parse and recreate the .rsrc section, but just link it in without inspecting it. This allows users to produce any .rsrc section (outside of what the parser supports), just like before. (I don't have a specific need for this, but it reduces the risk of this new feature.) Separate out the .rsrc section chunks in InputFiles.cpp, and only include them in the list of section chunks to link if we've determined that there only was one single resource object. (We need to keep other chunks from those object files, as they can legitimately contain other sections as well, in addition to .rsrc section chunks.) Differential Revision: https://reviews.llvm.org/D66824 llvm-svn: 370436
* [WebAssembly] Implement NO_STRIPDan Gohman2019-08-297-7/+26
| | | | | | | | | | | | | This patch implements support for the NO_STRIP flag, which will allow __attribute__((used)) to be implemented. This accompanies https://reviews.llvm.org/D62542, which moves to setting the NO_STRIP flag, and will continue to set EXPORTED for Emscripten targets for compatibility. Differential Revision: https://reviews.llvm.org/D66968 llvm-svn: 370416
* lld: Make a test not fail if "repro" is part of the build directory nameNico Weber2019-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | r268231 made it so that the name of the --reproduce archive is no longer listed in the response file. Previously, with "--reproduce repro.tar" the response file would contain repro/home/.../llvm-build-dir/.../foo.o but after that change it contained home/.../llvm-build-dir/.../foo.o instead. The test added for this in r268231 checked that the response file doesn't contain the string "repro", but if the build dir is named e.g. "llvm-build-repro" then the test fails because of that. Change the assert to check that "repro" doesn't exist at the beginning of the line instead. I verified that the test still fails with r268231 reverted. The test technically still fails if someone builds llvm in a directory '/repro' below the root directory. Don't do that :) llvm-svn: 370211
* [ELF][RISCV] Allow PT_LOAD to have overlapping p_offset ranges on EM_RISCVFangrui Song2019-08-2810-156/+169
| | | | | | | | Port the D64906 technique to RISC-V. It deletes 3 alignments at PT_LOAD boundaries for the default case: the size of a RISC-V binary decreases by at most 12kb. llvm-svn: 370192
* [mach-o] Extend LC_DATA_IN_CODE support to x86_64Rui Ueyama2019-08-281-8/+42
| | | | | | | | Patch by LemonBoy Differential Revision: https://reviews.llvm.org/D62185 llvm-svn: 370183
* [ELF][AMDGPU][SPARC] Allow PT_LOAD to have overlapping p_offset ranges on ↵Fangrui Song2019-08-283-27/+26
| | | | | | EM_AMDGPU and EM_SPARCV9 llvm-svn: 370180
* [ELF][RISCV] Assign st_shndx of __global_pointer$ to 1 if .sdata does not existFangrui Song2019-08-285-63/+24
| | | | | | | | | | | | | | | | | | | | | | | | This essentially reverts the code change of D63132 and switches to a simpler approach. In an executable/shared object, st_shndx of a symbol can be: 1) SHN_UNDEF: undefined symbol (or canonical PLT) 2) SHN_ABS: absolute symbol 3) any other value (usually a regular section index) represents a relative symbol. The actual value does not matter. Many ld.so (musl, all archs except MIPS of FreeBSD rtld-elf) even treat 2) and 3) the same. If .sdata does not exist, it does not matter what value/section __global_pointer$ has, as long as it is relative (otherwise there will be a pedantic lld error. See D63132). Just set the st_shndx arbitrarily to 1. Dummy st_shndx=1 may be used by __rela_iplt_start, linker-script-defined symbols outside a section, __dso_handle, etc. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66798 llvm-svn: 370172
* Revert "Change the X86 datalayout to add three address spaces for 32 bit ↵Vlad Tsyrklevich2019-08-28191-191/+191
| | | | | | | | | signed," This reverts commit r370083 because it caused check-lld failures on sanitizer-x86_64-linux-fast. llvm-svn: 370142
* [lld][WebAssembly] Support for growable tablesJacob Gravelle2019-08-275-1/+27
| | | | | | | | | | | | | | | Adds --growable-table flag to handle building wasm modules with tables that can grow. Wasm tables that we use to store function pointers. In order to add functions to that table at runtime, we need to either preallocate space, or grow the table. In order to specify a table with no maximum size, we need some flag to handle that case, separately from a potential --max-table-size= flag. Note that the number of elements in the table isn't knowable until link-time, so it's unclear if we will want a --max-table-size= flag in the future. llvm-svn: 370127
* Change the X86 datalayout to add three address spaces for 32 bit signed,Amy Huang2019-08-27191-191/+191
| | | | | | 32 bit unsigned, and 64 bit pointers. llvm-svn: 370083
* [ELF][ARM] Allow PT_LOAD to have overlapping p_offset ranges on EM_ARMFangrui Song2019-08-2750-671/+668
| | | | | | | | | | | | Port the D64906 technique to ARM. It deletes 3 alignments at PT_LOAD boundaries for the default case: the size of an arm binary decreases by at most 12kb. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D66749 llvm-svn: 370049
* [ELF][ARM] Add --no-show-raw-insn and -soname to some ARM testsFangrui Song2019-08-2719-68/+60
| | | | | | | Delete some insignificant addresses to make it simpler for layout changes. llvm-svn: 370048
* [lld][WebAssembly] Create optional symbols after handling --export/--undefinedSam Clegg2019-08-273-2/+34
| | | | | | | | | | | Handling of --export/--undefined can pull in lazy symbols which in turn can pull in referenced to optional symbols. We need to delay the creation of optional symbols until all possible references to them have been created. Differential Revision: https://reviews.llvm.org/D66768 llvm-svn: 370012
* [lld][WebAssembly] Store table base in config rather than passing it around. ↵Sam Clegg2019-08-274-12/+16
| | | | | | | | | | | NFC. I've got another change that makes more use of this value in other places. Differential Revision: https://reviews.llvm.org/D66777 llvm-svn: 370010
* Copy test data so tests don't traverse test directories. NFCRichard Trieu2019-08-262-1/+71
| | | | llvm-svn: 369984
* [ELF] EhFrameSection: postpone FDE liveness check to finalizeSectionsFangrui Song2019-08-264-32/+50
| | | | | | | | | | | | | | | EhFrameSection::addSection checks liveness of FDE early. This makes it infeasible to move combineEhSections() before ICF. Postpone the check to EhFrameSection::finalizeContents(). This is what ARMExidxSyntheticSection does and it will make a subsequent patch D66717 simpler. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66727 llvm-svn: 369890
* [ELF] Make LinkerScript::assignAddresses iterativeFangrui Song2019-08-267-17/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR42990. For `SECTIONS { b = a; . = 0xff00 + (a >> 8); a = .; }`, we currently set st_value(a)=0xff00 while st_value(b)=0xffff. The following call tree demonstrates the problem: ``` link<ELF64LE>(Args); Script->declareSymbols(); // insert a and b as absolute Defined Writer<ELFT>().run(); Script->processSectionCommands(); addSymbol(cmd); // a and b are re-inserted. LinkerScript::getSymbolValue // is lazily called by subsequent evaluation finalizeSections(); forEachRelSec(scanRelocations<ELFT>); processRelocAux // another problem PR42506, not affected by this patch finalizeAddressDependentContent(); // loop executed once script->assignAddresses(); // a = 0, b = 0xff00 script->assignAddresses(); // a = 0xff00, _end = 0xffff ``` We need another assignAddresses() to finalize the value of `a`. This patch 1) modifies assignAddress() to track the original section/value of each symbol and return a symbol whose section/value has changed. 2) moves the post-finalizeSections assignAddress() inside the loop of finalizeAddressDependentContent() and makes it iterative. Symbol assignment may not converge so we make a few attempts before bailing out. Note, assignAddresses() must be called at least twice. The penultimate call finalized section addresses while the last finalized symbol values. It is somewhat obscure and there was no comment. linkerscript/addr-zero.test tests this. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66279 llvm-svn: 369889
* [ELF] Error if --strip-all and --emit-relocs are used togetherFangrui Song2019-08-262-0/+6
| | | | | | | | | | | | | | | | | | | | | | | --strip-all suppresses the creation of in.symtab This can cause a null pointer dereference in OutputSection::finalize() // --emit-relocs => copyRelocs is true if (!config->copyRelocs || (type != SHT_RELA && type != SHT_REL)) return; ... link = in.symTab->getParent()->sectionIndex; // in.symTab is null Let's just disallow the combination. In some cases the combination can cause GNU linkers to fail: * ld.bfd: final link failed: invalid operation * gold: internal error in set_no_output_symtab_entry, at ../../gold/object.h:1814 Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66704 llvm-svn: 369878
* [ELF] Delete a redundant dyn_cast<InputSection>. NFCFangrui Song2019-08-251-6/+5
| | | | llvm-svn: 369868
* [ELF] Simplify with less_second. NFCFangrui Song2019-08-241-4/+1
| | | | llvm-svn: 369844
* [ELF] Make member function Writer<ELFT>::removeEmptyPTLoad non-member. NFCFangrui Song2019-08-241-3/+1
| | | | llvm-svn: 369838
* [ELF] Align the first section of a PT_LOAD even if its type is SHT_NOBITSFangrui Song2019-08-245-22/+51
| | | | | | | | | | | | | | | | | | | | | Reported at https://reviews.llvm.org/D64930#1642223 If the only section of a PT_LOAD is a SHT_NOBITS section (e.g. .bss), we may not align its sh_offset. p_offset of the PT_LOAD will be set to sh_offset, and we will get p_offset!=p_vaddr (mod p_align). If such executable is mapped by the Linux kernel, it will segfault. After D64906, this may happen the non-linker script case. The linker script case has had this issue for a long time. This was fixed by rL321657 (but the test linkerscript/nobits-offset.s failed to test a SHT_NOBITS section), but broken by rL345154. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D66658 llvm-svn: 369828
* [ELF] Mention contents of reproduce archive and add help description.Peter Smith2019-08-232-3/+6
| | | | | | | | | | | | Building on D60557 mention the name of the linker generated contents of the reproduce archive, response.txt and version.txt. Also write a shorter description in the ld.lld --help that is closer to the documentation. Differential Revision: https://reviews.llvm.org/D66641 llvm-svn: 369762
* Explain --reproduce optionRui Ueyama2019-08-231-2/+4
| | | | | | | | | | I think --reproduce is no longer a debug-only option but a useful option that a common user may want to use. So, this patch updates the description of the option in the manual page. Differential Revision: https://reviews.llvm.org/D60557 llvm-svn: 369740
* Add a description about multiple linker scriptsRui Ueyama2019-08-231-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D66630 llvm-svn: 369737
* Fight a bit against global initializers. NFC.Benjamin Kramer2019-08-222-4/+4
| | | | llvm-svn: 369695
* [COFF] Add libcall symbols to the link when LTO is being usedAmy Huang2019-08-228-0/+69
| | | | llvm-svn: 369694
* [lld-link] implement -lto-obj-pathBob Haarman2019-08-215-0/+34
| | | | | | | | | | | | | | | | | | | Summary: This adds the -lto-obj-path option to lld-link. This can be used to specify a path at which to write a native object file for the full LTO part when using LTO unit splitting. Reviewers: ruiu, tejohnson, pcc, rnk Reviewed By: ruiu, rnk Subscribers: mehdi_amini, steven_wu, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65964 llvm-svn: 369559
* [ELF][ARM] Simplify some llvm-objdump tests with both ARM/Thumb statesFangrui Song2019-08-216-167/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | llvm-objdump can switch between ARM/Thumb states after D60927. In a few lld tests, we run both * llvm-objdump -d -triple=thumbv7a-none-linux-gnueabi %t * llvm-objdump -d -triple=armv7a-none-linux-gnueabi %t to test ARM/Thumb parts of the same file. In many cases we can just run one command. There is a problem that prevents us from cleaning more tests (e.g. test/ELF/arm-thumb-interwork-thunk.s): In llvm-objdump, while we have ARM/Thumb (primary and secondary) MCDisassembler and MCSubtargetInfo, we have just one MCInstrAnalysis which is used to resolve the targets of calls in both ARM/Thumb parts. // ThumbMCInstrAnalysis evaluating ARM parts or ARMMCInstrAnalysis evaluating Thumb parts // will have incorrect offsets. // An example of llvm-objdump -d -triple=thumbv7a on ARM part: 1304: 3d ff ff fa blx #-780 # no <...> 1308: 06 00 00 ea b #24 <arm_caller+0x24> # wrong target due to wrong offset Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D66539 llvm-svn: 369535
* [LLD][ELF] - Simplify the bad-archive.s test case.George Rimar2019-08-212-5/+6
| | | | | | | | | This removes the precompiled binary and improves the check of the error reported. Differential revision: https://reviews.llvm.org/D66523 llvm-svn: 369516
* Reland D65242 "[ELF] More dynamic relocation packing""Fangrui Song2019-08-212-119/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed a bug in r369488. When config->isRela is false, i->r_addend is not initialized (see encodeDynamicReloc). So we should check config->isRela before accessing r_addend: - if (j - i < 3 || i->r_addend) + if (j - i < 3 || (config->isRela && i->r_addend != 0)) Original description: Currently, with Android dynamic relocation packing, only relative relocations are grouped together. This patch implements similar packing for non-relative relocations. The implementation groups non-relative relocations with the same r_info and r_addend, if using RELA. By requiring a minimum group size of 3, this achieves smaller relocation sections. Building Android for an ARM32 device, I see the total size of /system/lib decrease by 392 KB. Grouping by r_info also allows the runtime dynamic linker to implement an 1-entry cache to reduce the number of symbol lookup required. With such 1-entry cache implemented on Android, I'm seeing 10% to 20% reduction in total time spent in runtime linker for several executables that I tested. As a simple correctness check, I've also built x86_64 Android and booted successfully. Differential Revision: https://reviews.llvm.org/D65242 Patch by Vic Yang llvm-svn: 369507
* Revert D65242 "[ELF] More dynamic relocation packing"Fangrui Song2019-08-212-221/+119
| | | | | | | | | This reverts r369488 and r369489. The change broke build bots: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/14511 http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/34407 llvm-svn: 369497
* [ELF][test] Add CHECK lines omitted in r369488Fangrui Song2019-08-211-8/+34
| | | | | | Add append .o to some object file names llvm-svn: 369489
* [ELF] More dynamic relocation packingFangrui Song2019-08-212-111/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, with Android dynamic relocation packing, only relative relocations are grouped together. This patch implements similar packing for non-relative relocations. The implementation groups non-relative relocations with the same r_info and r_addend, if using RELA. By requiring a minimum group size of 3, this achieves smaller relocation sections. Building Android for an ARM32 device, I see the total size of /system/lib decrease by 392 KB. Grouping by r_info also allows the runtime dynamic linker to implement an 1-entry cache to reduce the number of symbol lookup required. With such 1-entry cache implemented on Android, I'm seeing 10% to 20% reduction in total time spent in runtime linker for several executables that I tested. As a simple correctness check, I've also built x86_64 Android and booted successfully. Differential Revision: https://reviews.llvm.org/D66491 Patch by Vic Yang! llvm-svn: 369488
* [COFF] Check errorCount before committing the output fileMartin Storsjo2019-08-202-0/+5
| | | | | | | | | | | | This avoids producing an output file if errors appeared late in the linking process (e.g. while fixing relocations, or as in the test, while checking for multiple resources). If an output file is produced, build tools might not retry building it on rebuilds, even if a previous build failed due to the error return code. Differential Revision: https://reviews.llvm.org/D66491 llvm-svn: 369445
* [COFF] Print the file name on errors writing the pdb fileMartin Storsjo2019-08-201-0/+1
| | | | | | | | | | | This avoids confusing contextless error messages such as "No such file or directory" if e.g. the pdb output file should be written to a nonexistent directory. (This can happen with linkrepro scripts, at least old ones.) Differential Revision: https://reviews.llvm.org/D66466 llvm-svn: 369425
* [WebAssembly][lld] Fix crash when applying relocations to debug sectionsSam Clegg2019-08-203-2/+25
| | | | | | | | | | | | | | Debug sections are special in that they can contain relocations against symbols that are not present in the final output (i.e. not live). However it is also possible to have R_WASM_TABLE_INDEX relocations against symbols that don't have a table index assigned (since they are not address taken by actual code. Fixes: https://github.com/emscripten-core/emscripten/issues/9023 Differential Revision: https://reviews.llvm.org/D66435 llvm-svn: 369423
* [COFF] Require an explicit -implib option for creating implibs in mingw modeMartin Storsjo2019-08-202-2/+24
| | | | | | | | GNU ld doesn't produce implibs unless explicitly requested. Differential Revision: https://reviews.llvm.org/D66367 llvm-svn: 369363
OpenPOWER on IntegriCloud