summaryrefslogtreecommitdiffstats
path: root/lld
Commit message (Collapse)AuthorAgeFilesLines
...
* [COFF] Add an lld specific option /includeoptionalMartin Storsjo2019-06-084-0/+93
| | | | | | | | | This works like /include, but is not fatal if the requested symbol wasn't found. This allows implementing the GNU ld option -u. Differential Revision: https://reviews.llvm.org/D62976 llvm-svn: 362881
* [ELF][PPC] Simplify {read,write}FromHalf16Fangrui Song2019-06-082-30/+31
| | | | | | | | | | | | | | | I've change the variable names used in PPC64.cpp from "Instr" to "Insn" because "Insn" is a more common abbreviation for "instruction". While changing PPC64.cpp relocateOne(), make R_PPC64_ADDR16_LO{_DS} slightly more efficient by saving a read and a write for the TocOptimize case. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D63043 llvm-svn: 362867
* [COFF] Fix /export:foo=bar when bar is a weak aliasReid Kleckner2019-06-077-45/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When handling exports from the command line or from .def files, the linker does a "fuzzy" string lookup to allow finding mangled symbols. However, when the symbol is re-exported under a new name, the linker has to transfer the decorations from the exported symbol over to the new name. This is implemented by taking the mangled symbol that was found in the object and replacing the original symbol name with the export name. Before this patch, LLD implemented the fuzzy search by adding an undefined symbol with the unmangled name, and then during symbol resolution, checking if similar mangled symbols had been added after the last round of symbol resolution. If so, LLD makes the original symbol a weak alias of the mangled symbol. Later, to get the original symbol name, LLD would look through the weak alias and forward it on to the import library writer, which copies the symbol decorations. This approach doesn't work when bar is itself a weak alias, as is the case in asan. It's especially bad when the aliasee of bar contains the string "bar", consider "bar_default". In this case, we would end up exporting the symbol "foo_default" when we should've exported just "foo". To fix this, don't look through weak aliases to find the mangled name. Save the mangled name earlier during fuzzy symbol lookup. Fixes PR42074 Reviewers: mstorsjo, ruiu Subscribers: thakis, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62984 llvm-svn: 362849
* docs: Update partitioning docs now that the feature is fully landed.Peter Collingbourne2019-06-071-3/+2
| | | | llvm-svn: 362831
* ELF: Create synthetic sections for loadable partitions.Peter Collingbourne2019-06-0717-409/+1124
| | | | | | | | | | | | | | | We create several types of synthetic sections for loadable partitions, including: - The dynamic symbol table. This allows code outside of the loadable partitions to find entry points with dlsym. - Creating a dynamic symbol table also requires the creation of several other synthetic sections for the partition, such as the dynamic table and hash table sections. - The partition's ELF header is represented as a synthetic section in the combined output file, and will be used by llvm-objcopy to extract partitions. Differential Revision: https://reviews.llvm.org/D62350 llvm-svn: 362819
* [ELF][AArch64] Support for BTI and PACPeter Smith2019-06-0724-12/+961
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Branch Target Identification (BTI) and Pointer Authentication (PAC) are architecture features introduced in v8.5a and 8.3a respectively. The new instructions have been added in the hint space so that binaries take advantage of support where it exists yet still run on older hardware. The impact of each feature is: BTI: For executable pages that have been guarded, all indirect branches must have a destination that is a BTI instruction of the appropriate type. For the static linker, this means that PLT entries must have a "BTI c" as the first instruction in the sequence. BTI is an all or nothing property for a link unit, any indirect branch not landing on a valid destination will cause a Branch Target Exception. PAC: The dynamic loader encodes with PACIA the address of the destination that the PLT entry will load from the .plt.got, placing the result in a subset of the top-bits that are not valid virtual addresses. The PLT entry may authenticate these top-bits using the AUTIA instruction before branching to the destination. Use of PAC in PLT sequences is a contract between the dynamic loader and the static linker, it is independent of whether the relocatable objects use PAC. BTI and PAC are independent features that can be combined. So we can have several combinations of PLT: - Standard with no BTI or PAC - BTI PLT with "BTI c" as first instruction. - PAC PLT with "AUTIA1716" before the indirect branch to X17. - BTIPAC PLT with "BTI c" as first instruction and "AUTIA1716" before the first indirect branch to X17. The use of BTI and PAC in relocatable object files are encoded by feature bits in the .note.gnu.property section in a similar way to Intel CET. There is one AArch64 specific program property GNU_PROPERTY_AARCH64_FEATURE_1_AND and two target feature bits defined: - GNU_PROPERTY_AARCH64_FEATURE_1_BTI -- All executable sections are compatible with BTI. - GNU_PROPERTY_AARCH64_FEATURE_1_PAC -- All executable sections have return address signing enabled. Due to the properties of FEATURE_1_AND the static linker can tell when all input relocatable objects have the BTI and PAC feature bits set. The static linker uses this to enable the appropriate PLT sequence. Neither -> standard PLT GNU_PROPERTY_AARCH64_FEATURE_1_BTI -> BTI PLT GNU_PROPERTY_AARCH64_FEATURE_1_PAC -> PAC PLT Both properties -> BTIPAC PLT In addition to the .note.gnu.properties there are two new command line options: --force-bti : Act as if all relocatable inputs had GNU_PROPERTY_AARCH64_FEATURE_1_BTI and warn for every relocatable object that does not. --pac-plt : Act as if all relocatable inputs had GNU_PROPERTY_AARCH64_FEATURE_1_PAC. As PAC is a contract between the loader and static linker no warning is given if it is not present in an input. Two processor specific dynamic tags are used to communicate that a non standard PLT sequence is being used. DTI_AARCH64_BTI_PLT and DTI_AARCH64_BTI_PAC. Differential Revision: https://reviews.llvm.org/D62609 llvm-svn: 362793
* [ELF] Delete R_PPC64_CALL_PLT from isRelExpr()Fangrui Song2019-06-071-2/+1
| | | | | | | | | | | It was added by D46654 but is actually never used. R_PPC64_CALL_PLT (was: R_PPC_CALL_PLT) is a static link-time constant. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62994 llvm-svn: 362788
* [lld] Allow args::getInterger to parse args larger than 2^31-1Sam Clegg2019-06-073-3/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D62933 llvm-svn: 362770
* [WebAssembly] Fix for discarded init functionsSam Clegg2019-06-079-37/+84
| | | | | | | | | When a function is excluded via comdat we shouldn't add it to the final list of init functions. Differential Revision: https://reviews.llvm.org/D62983 llvm-svn: 362769
* Revert [ELF] Simplify the condition to create .interpJordan Rupprecht2019-06-062-8/+11
| | | | | | | | This reverts r362355 (git commit c78c999a9cd7a77b9d13c610c9faebac5d560a55) This causes some internal tests to fail; details provided offthread. llvm-svn: 362755
* Revert "Revert "[ELF] Suppress "STT_SECTION symbol should be defined" on ↵Sean Fertile2019-06-065-62/+53
| | | | | | | | .eh_frame, .debug*, .zdebug* and .gcc_except_table"" This reverts commit f49f58527a6d8147524d8d6f2eb1feb70f856292. llvm-svn: 362744
* Revert "Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION ↵Sean Fertile2019-06-0610-12/+100
| | | | | | | | | | symbols if the sections were discarded"" This reverts commit 729111cf1824159bb4dd331cab8a829eab30313f. Reverting the previous commit breaks other LLD buildbots. llvm-svn: 362743
* Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if ↵Sean Fertile2019-06-0610-100/+12
| | | | | | | | | | the sections were discarded" This reverts commit 5d3b3188f722456a6470c7effcacf17656406429. Breaks the PowerPC multi-stage buildbot. llvm-svn: 362739
* Revert "[ELF] Suppress "STT_SECTION symbol should be defined" on .eh_frame, ↵Sean Fertile2019-06-065-53/+62
| | | | | | | | | | | .debug*, .zdebug* and .gcc_except_table" This reverts commit dcba4828a9ead5f5b1fa27f0853823618075d0e0. This commit builds on dcba4828a9ead5f5b1fa27f0853823618075d0e0 which breaks the multi-staged PowerPC buildbot. llvm-svn: 362738
* Fixing ppc tests: sed -i 's/# REQUIES: ppc/# REQUIRES: ppc/g'Puyan Lotfi2019-06-063-3/+3
| | | | llvm-svn: 362728
* [PPC32] Support GD/LD/IE/LE TLS models and their relaxationsFangrui Song2019-06-068-4/+462
| | | | | | | | Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62940 llvm-svn: 362722
* [PPC32] Improve the 32-bit PowerPC portFangrui Song2019-06-0626-329/+934
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many -static/-no-pie/-shared/-pie applications linked against glibc or musl should work with this patch. This also helps FreeBSD PowerPC64 to migrate their lib32 (PR40888). * Fix default image base and max page size. * Support new-style Secure PLT (see below). Old-style BSS PLT is not implemented, so it is not suitable for FreeBSD rtld now because it doesn't support Secure PLT yet. * Support more initial relocation types: R_PPC_ADDR32, R_PPC_REL16*, R_PPC_LOCAL24PC, R_PPC_PLTREL24, and R_PPC_GOT16. The addend of R_PPC_PLTREL24 is special: it decides the call stub PLT type but it should be ignored for the computation of target symbol VA. * Support GNU ifunc * Support .glink used for lazy PLT resolution in glibc * Add a new thunk type: PPC32PltCallStub that is similar to PPC64PltCallStub. It is used by R_PPC_REL24 and R_PPC_PLTREL24. A PLT stub used in -fPIE/-fPIC usually loads an address relative to .got2+0x8000 (-fpie/-fpic code uses _GLOBAL_OFFSET_TABLE_ relative addresses). Two .got2 sections in two object files have different addresses, thus a PLT stub can't be shared by two object files. To handle this incompatibility, change the parameters of Thunk::isCompatibleWith to `const InputSection &, const Relocation &`. PowerPC psABI specified an old-style .plt (BSS PLT) that is both writable and executable. Linkers don't make separate RW- and RWE segments, which causes all initially writable memory (think .data) executable. This is a big security concern so a new PLT scheme (secure PLT) was developed to address the security issue. TLS will be implemented in D62940. glibc older than ~2012 requires .rela.dyn to include .rela.plt, it can not handle the DT_RELA+DT_RELASZ == DT_JMPREL case correctly. A hack (not included in this patch) in LinkerScript.cpp addOrphanSections() to work around the issue: if (Config->EMachine == EM_PPC) { // Older glibc assumes .rela.dyn includes .rela.plt Add(In.RelaDyn); if (In.RelaPlt->isLive() && !In.RelaPlt->Parent) In.RelaDyn->getParent()->addSection(In.RelaPlt); } Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62464 llvm-svn: 362721
* [WebAssembly] Improve lto/comdat.ll test. NFC.Sam Clegg2019-06-051-3/+5
| | | | | | | | | | | | | | | We were not previously testing the comdat exclusion in bitcode objects because we were linking two copies of the .bc file and the `linkonce_odr` linkage type was removing the duplicate `_start` at the LTO stage. Now we link an bitcode and non-bitcode version both of which contains a copy of _start. We link them in both orders, which means this test will fail if comdat exclusion is not working correctly in bitcode parsing. Differential Revision: https://reviews.llvm.org/D62923 llvm-svn: 362650
* [WebAssembly] Use Emscripten triples in PIC tests.Dan Gohman2019-06-052-2/+2
| | | | | | | | With r362638, llc doesn't support -relocation-model=pic with non-Emscripten triples. Update these tests in lld which use -relocation-model=pic to also use Emscripten triples. llvm-svn: 362645
* [WebAssembly] Handle object parsing more like the ELF backendSam Clegg2019-06-053-16/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D62886 llvm-svn: 362626
* [lld] Explicitly ignore comdat groups when parsing LTO object(s)Sam Clegg2019-06-054-39/+23
| | | | | | | | | | | | | Any symbols defined in the LTO object are by definition the ones we want in the final output so we skip the comdat group checking in those cases. This change makes the ELF code more explicit about this and means that wasm and ELF do this in the same way. Differential Revision: https://reviews.llvm.org/D62884 llvm-svn: 362625
* [ELF] Allow reading of more than one FEATURE_1_AND in same object.Peter Smith2019-06-053-7/+44
| | | | | | | | | | | | | Although many relocatable objects will have a single GNU_PROPERTY_X86_FEATURE_1_AND in the .note.gnu.property section it is permissible to have more than one, and there are tests in ld.bfd that use it. The behavior that ld.bfd follows is to set the feature bit for a relocatable object if any of the GNU_PROPERTY_X86_FEATURE_1_AND have the feature bit set. Differential Revision: https://reviews.llvm.org/D62862 llvm-svn: 362591
* Read .note.gnu.property sections and emit a merged .note.gnu.property section.Rui Ueyama2019-06-0518-0/+370
| | | | | | | | | | | | | This patch also adds `--require-cet` option for the sake of testing. The actual feature for IBT-aware PLT is not included in this patch. This is a part of https://reviews.llvm.org/D59780. Submitting this first should make it easy to work with a related change (https://reviews.llvm.org/D62609). Differential Revision: https://reviews.llvm.org/D62853 llvm-svn: 362579
* [LLD][COFF] Don't take into account the 'age' when looking for PDB type serverAlexandre Ganea2019-06-052-3/+3
| | | | | | | | The age field is only there to say how many times an OBJ or a PDB was incrementally linked. It shouldn't be used to validate the link between the OBJ and the PDB. Differential Revision: https://reviews.llvm.org/D62837 llvm-svn: 362572
* [WebAssembly] make wasm-ld --verbose show data section startVA and nameThomas Lively2019-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Make `wasm-ld --verbose` show data section start virtual address and name as well, instead of just showing the size. This makes it much easier to track which global variable is in which address when used in conjunction with `--no-merge-data-sections`. Patch by Guanzhong Chen Reviewers: tlively, aheejin, sbc100, ruiu Reviewed By: sbc100, ruiu Subscribers: ruiu, dschuff, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62834 llvm-svn: 362548
* [WebAssembly] Add comment as follow-up to rL362276. NFC.Sam Clegg2019-06-041-1/+3
| | | | | | | | | | Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62824 llvm-svn: 362522
* [ELF] Suppress "STT_SECTION symbol should be defined" on .eh_frame, .debug*, ↵Fangrui Song2019-06-045-62/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .zdebug* and .gcc_except_table Summary: With -r or --emit-relocs, we warn `STT_SECTION symbol should be defined` on relocations to discarded section symbol. This was added as an error in rLLD319404, but was not so effective before D61583 (it turned the error to a warning). Relocations from .eh_frame .debug* .zdebug* .gcc_except_table to discarded .text are very common and somewhat expected. Don't warn/error on them. As a reference, ld.bfd has a similar logic in _bfd_elf_default_action_discarded() to allow these cases. Delete invalid-undef-section-symbol.test because what it intended to check is now covered by the updated comdat-discarded-reloc.s Delete relocatable-eh-frame.s because we allow relocations from .eh_frame as a special case now. Reviewers: grimar, phosek, ruiu, espindola Reviewed By: ruiu Subscribers: emaste, arichardson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62840 llvm-svn: 362497
* ELF: Introduce a separate bit for tracking whether an output section has ↵Peter Collingbourne2019-06-034-11/+17
| | | | | | | | | | | | | | | | | | ever had an input section added to it. NFCI. We currently (ab)use the Live bit on output sections to track whether the section has ever had an input section added to it, and then later use it during orphan placement. This will conflict with one of my upcoming partition-related changes that will assign all output sections to a partition (thus marking them as live) so that they can be added to the correct segment by the code that creates program headers. Instead of using the Live bit for this purpose, create a new flag and start using it to track the property explicitly. Differential Revision: https://reviews.llvm.org/D62348 llvm-svn: 362444
* [PDB] Copy inlinee lines records into the PDBReid Kleckner2019-06-034-16/+799
| | | | | | | | | | | | | | | | | | Summary: - Fixes inline call frame line table display in windbg. - Improve llvm-pdbutil to dump extra file ids. - Warn on unknown subsections so we don't have this kind of bug in the future. Reviewers: inglorion, akhuang, aganea Subscribers: eraman, zturner, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62701 llvm-svn: 362429
* Re-land [LLD][COFF] Early load PDB type server filesAlexandre Ganea2019-06-038-144/+368
| | | | | | | | | | We need to have all input files ready before doing debuginfo type merging. This patch is moving the late PDB type server discovery much earlier in the process, when the explicit inputs (OBJs, LIBs) are loaded. The short term goal is to parallelize type merging. Differential Revision: https://reviews.llvm.org/D60095 llvm-svn: 362393
* [LLD][ELF] - Remove dead code. NFC.George Rimar2019-06-031-1/+0
| | | | | | I believe this line was dead after r362356. llvm-svn: 362367
* [ELF][PPC64] Rename some PPC64 ELFv2 specific RelExpr from R_PPC_* to R_PPC64_*Fangrui Song2019-06-035-23/+37
| | | | | | | | | | | | | | | | | | The following abstract relocation types (RelExpr) are PPC64 ELFv2 ABI specific, not used by PPC32. So rename them to prevent confusion when the PPC32 port is improved. * R_PPC_CALL R_PPC_CALL_PLT: R_PPC_CALL_PLT represents R_PPC64_REL14 and R_PPC64_REL24. If the function is not preemptable, R_PPC_CALL_PLT can be optimized to R_PPC_CALL: the formula adjusts the symbol VA from the global entry point to the local entry point. * R_PPC_TOC: represents R_PPC64_TOC. We don't have a test. Add one to ppc64-relocs.s Rename it to R_PPC64_TOCBASE because `@tocbase` is the assembly form. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62800 llvm-svn: 362359
* [ELF][PPC64] Don't apply LD->LE relaxation on R_PPC64_GOT_DTPREL16*Fangrui Song2019-06-034-34/+47
| | | | | | | | | | | | | | In ELF v2 ABI, R_PPC64_GOT_DTPREL16* are not relaxed. This family of relocation types are used for variables outside of 2GiB of the TLS block. 2 instructions cannot materialize a DTPREL offset that is not 32-bit. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62737 llvm-svn: 362357
* [ELF] Don't create an output section named `/DISCARD/` if it is assigned to ↵Fangrui Song2019-06-032-1/+4
| | | | | | | | | | | | | | | | the special phdr `NONE` Fixes the remaining issue of PR41673 after D61186: with `/DISCARD/ { ... } :NONE`, we may create an output section named `/DISCARD/`. Note, if an input section is named `/DISCARD/`, ld.bfd discards it but lld keeps it. It is probably not worth copying this behavior as it is unrealistic. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62768 llvm-svn: 362356
* [ELF] Simplify the condition to create .interpFangrui Song2019-06-032-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) {gcc,clang} -fuse-ld=bfd -pie -fPIE -nostdlib a.c => .interp created (2) {gcc,clang} -fuse-ld=lld -pie -fPIE -nostdlib a.c => .interp not created (3) {gcc,clang} -fuse-ld=lld -pie -fPIE -nostdlib a.c a.so => .interp created The inconsistency of (2) is due to the condition `!Config->SharedFiles.empty()`. To make lld behave more like ld.bfd, we could change the condition to: Config->HasDynSymTab && !Config->DynamicLinker.empty() && Script->needsInterpSection(); However, that would bring another inconsistency as can be observed with: (4) {gcc,clang} -fuse-ld=bfd -no-pie -nostdlib a.c => .interp not created So instead, use `!Config->DynamicLinker.empty() && Script->needsInterpSection()`, which is both simple and consistent in these cases. The inconsistency of (4) likely originated from ld.bfd and gold's choice to have a default --dynamic-linker. Their condition to create .interp is ANDed with (not -shared). Since lld doesn't have a default --dynamic-linker, compiler drivers (gcc/clang) don't pass --dynamic-linker for -shared, and direct ld users are not supposed to specify --dynamic-linker for -shared, we do not need the condition !Config->Shared. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62765 llvm-svn: 362355
* Add --sort-common to the man page.Rui Ueyama2019-06-031-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D62799 llvm-svn: 362354
* [ELF][MIPS] Delete dead !Sym->isDefined() check in addAbsolute()Fangrui Song2019-06-021-2/+0
| | | | llvm-svn: 362314
* [ELF][test] Reorganize some AArch64 testsFangrui Song2019-06-0116-297/+175
| | | | | | | | | | | | | Delete aarch64-got.s because it is covered by aarch64-tls-iele.s Merge got-aarch64.s into aarch64-fpic-got.s by adding disassembly to the latter Create aarch64-gnu-ifunc-nonpreemptable to unify aarch64-gnu-ifunc3.s (position-dependent executable) and aarch64-gnu-ifunc-address-pie.s (PIE) Rename aarch64-got-reloc.s to aarch64-got-weak-undef.s Add --no-show-raw-insn to llvm-objdump -d RUN lines Add -pie test to arch64-tls-iele.s Delete aarch64-tls-pie.s: it is covered by arch64-tls-iele.s and aarch64-tls-le.s Rename aarch64-copy2.s to aarch64-nopic-plt.s: "copy2" gives false impression that the test is related to copy relocation llvm-svn: 362294
* [WebAssembly] Don't export __data_end and __heap_base by default.Sam Clegg2019-05-3123-268/+42
| | | | | | | | These can still be exported via --export if needed. Differential Revision: https://reviews.llvm.org/D62744 llvm-svn: 362276
* [PPC64][test] Delete redundant labels from ppc64-relocs.sFangrui Song2019-05-311-80/+20
| | | | llvm-svn: 362235
* [ELF] Delete GotEntrySize and GotPltEntrySizeFangrui Song2019-05-3112-35/+14
| | | | | | | | | | | | | GotEntrySize and GotPltEntrySize were added in D22288. Later, with the introduction of wordsize() (then Config->Wordsize), they become redundant, because there is no target that sets GotEntrySize or GotPltEntrySize to a number different from Config->Wordsize. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D62727 llvm-svn: 362220
* [ELF] Replace a dead test in getSymVA() with assert()Fangrui Song2019-05-311-7/+1
| | | | | | | | | | | | Symbols relative to discarded comdat sections are Undefined instead of Defined now (after D59649 and D61583). The `== &InputSection::Discarded` test becomes dead. I cannot find a test related to this behavior. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62725 llvm-svn: 362218
* [ELF][test] Restore linkerscript/symbol-location.s to test ↵Fangrui Song2019-05-311-0/+16
| | | | | | | | | | | | getLinkerScriptLocation() The test (the only test that checks getLinkerScriptLocation()) deleted by r358652 can be restored by replacing R_X86_64_PLT32 with R_X86_64_PC32, and changing -pie to -shared (preemptable). Then, the symbol will not be a link-time constant and a -fPIC error will be issued. llvm-svn: 362207
* [WebAssembly] Improve feature validation error messagesThomas Lively2019-05-304-26/+38
| | | | | | | | | | | | | | | | Summary: Add the names of the input files responsible for each error to the messages. Reviewers: sbc100, azakai Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62704 llvm-svn: 362162
* [Docs] Modernize references to macOSJ. Ryan Stinnett2019-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS" when no specific version number is mentioned. If a specific version is mentioned, this attempts to use the OS name at the time of that version: * Mac OS X for 10.0 - 10.7 * OS X for 10.8 - 10.11 * macOS for 10.12 - present Reviewers: JDevlieghere Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits Tags: #clang, #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D62654 llvm-svn: 362113
* [ELF] Delete dead SHT_NOBITS->SHT_PROGBITS code after r358981Fangrui Song2019-05-301-5/+0
| | | | | | | After D60131/r358981, we no longer create SHT_NOBITS sections that may contain ByteCommand (BYTE, SHORT, LONG, QUAD). llvm-svn: 362108
* [ELF] De-template addUndefined() and addWrappedSymbols(). NFCFangrui Song2019-05-301-6/+5
| | | | llvm-svn: 362099
* [ELF][test] Update znotext-plt-relocations.s to emit R_X86_64_PC32Fangrui Song2019-05-301-1/+2
| | | | | | | | | | | This is a leftover from r325379. The intention of this test was to check in a non-pic link, R_X86_64_PC32 to a STT_FUNC created a PLT. However, after the llvm-mc change in r325569, this code path is no longer exercised. Use the r325379 trick to keep testing R_X86_64_PC32. llvm-svn: 362095
* [ELF] Implement Local Dynamic style TLSDESC for x86-64Fangrui Song2019-05-305-6/+80
| | | | | | | | | | | | | | | | | | | | | | | For the Local Dynamic case of TLSDESC, _TLS_MODULE_BASE_ is defined as a special TLS symbol that makes: 1) Without relaxation: it produces a dynamic TLSDESC relocation that computes 0. Adding @dtpoff to access a TLS symbol. 2) With LD->LE relaxation: _TLS_MODULE_BASE_@tpoff = 0 (lowest address in the TLS block). Adding @tpoff to access a TLS symbol. For 1), this saves dynamic relocations and GOT slots as otherwise (General Dynamic) we would create an R_X86_64_TLSDESC and reserve two GOT slots for each symbol. Add ElfSym::TlsModuleBase and change the signature of getTlsTpOffset() to special case _TLS_MODULE_BASE_. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62577 llvm-svn: 362078
* [WebAssembly] Move direct call tracking from member to local. NFC.Sam Clegg2019-05-292-10/+10
| | | | | | | | | | | This data structure is only needed temporarily while symbols are being created. This is a followup on rL361678. Differential Revision: https://reviews.llvm.org/D62548 llvm-svn: 361977
OpenPOWER on IntegriCloud