summaryrefslogtreecommitdiffstats
path: root/lld/docs
Commit message (Collapse)AuthorAgeFilesLines
* Minor ReleaseNotes fixesHans Wennborg2020-03-021-9/+9
|
* ReleaseNotes: remove in-progress warnings, tidy up a bitHans Wennborg2020-02-281-13/+1
|
* [lld][ELF] Add some release notesFangrui Song2020-02-271-1/+53
| | | | | | Reviewed By: hans Differential Revision: https://reviews.llvm.org/D75216
* [docs][WebAssembly] WebAssembly-specific release notes for 10.0.Dan Gohman2020-02-251-0/+1
|
* [LLD] Add release notes for MinGW for the 10.x branchMartin Storsjö2020-02-051-1/+27
| | | | Differential Revision: https://reviews.llvm.org/D74026
* [docs][mips] 10.0 Release notesSimon Atanasyan2020-01-261-0/+8
| | | | | | MIPS specific part of LLVM 10.0 Release notes for LLVM, Clang and LLD. Differential Revision: https://reviews.llvm.org/D73108
* [ELF] Add -z force-ibt and -z shstk for Intel Control-flow Enforcement ↵Fangrui Song2020-01-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Technology This patch is a joint work by Rui Ueyama and me based on D58102 by Xiang Zhang. It adds Intel CET (Control-flow Enforcement Technology) support to lld. The implementation follows the draft version of psABI which you can download from https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI. CET introduces a new restriction on indirect jump instructions so that you can limit the places to which you can jump to using indirect jumps. In order to use the feature, you need to compile source files with -fcf-protection=full. * IBT is enabled if all input files are compiled with the flag. To force enabling ibt, pass -z force-ibt. * SHSTK is enabled if all input files are compiled with the flag, or if -z shstk is specified. IBT-enabled executables/shared objects have two PLT sections, ".plt" and ".plt.sec". For the details as to why we have two sections, please read the comments. Reviewed By: xiangzhangllvm Differential Revision: https://reviews.llvm.org/D59780
* fix a few typos to cycle the botsNico Weber2020-01-094-8/+8
|
* [lld] Fix trivial typos in commentsKazuaki Ishizaki2020-01-062-2/+2
| | | | | | Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D72196
* hopefully last doc typo fix to cycle botsNico Weber2019-12-201-1/+1
|
* fix yet another doc typo to cycle botsNico Weber2019-12-201-2/+2
|
* Update the man pageRui Ueyama2019-12-131-1/+8
| | | | | | Add a description about the compression level of the debug info. Differential Revision: https://reviews.llvm.org/D71385
* [WebAssembly] Add new `export_name` clang attribute for controlling wasm ↵Sam Clegg2019-12-111-7/+9
| | | | | | | | | | | | | | | | | | | | export names This is equivalent to the existing `import_name` and `import_module` attributes which control the import names in the final wasm binary produced by lld. This maps the existing This attribute currently requires a string rather than using the symbol name for a couple of reasons: 1. Avoid confusion with static and dynamic linking which is based on symbol name. Exporting a function from a wasm module using this directive is orthogonal to both static and dynamic linking. 2. Avoids name mangling. Differential Revision: https://reviews.llvm.org/D70520
* [ELF][AArch64] Rename --force-bti to -z force-bti and --pac-plt to -z pac-pltFangrui Song2019-12-111-4/+6
| | | | | | | | | | | | | | | | | | | Summary: The original design used --foo but the upstream complained that ELF only options should be -z foo. See https://sourceware.org/ml/binutils/2019-04/msg00151.html https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=8bf6d176b0a442a8091d338d4af971591d19922c made the rename. Our --force-bti and --pac-plt implement the same functionality, so it seems wise to be consistent with GNU ld. Reviewed By: peter.smith Subscribers: emaste, arichardson, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71327
* [lld] [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACKMichał Górny2019-10-291-0/+5
| | | | | | | | | Add a new '-z nognustack' option that suppresses emitting PT_GNU_STACK segment. This segment is not supported at all on NetBSD (stack is always non-executable), and the option is meant to be used to disable emitting it. Differential Revision: https://reviews.llvm.org/D56554
* Update release notesRui Ueyama2019-10-181-1/+5
| | | | llvm-svn: 375206
* Revert r371729: lld-link: Make /linkrepro: take a filename, not a directory.Rui Ueyama2019-10-041-5/+0
| | | | | | | | | | This reverts commit r371729 because /linkrepro option also exists in Microsoft link.exe and their linker takes not a filename but a directory name as an argument for /linkrepro. Differential Revision: https://reviews.llvm.org/D68378 llvm-svn: 373703
* [ELF] Add -z separate-loadable-segments to complement separate-code and ↵Fangrui Song2019-09-251-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | noseparate-code D64906 allows PT_LOAD to have overlapping p_offset ranges. In the default R RX RW RW layout + -z noseparate-code case, we do not tail pad segments when transiting to another segment. This can save at most 3*maxPageSize bytes. a) Before D64906, we tail pad R, RX and the first RW. b) With -z separate-code, we tail pad R and RX, but not the first RW (RELRO). In some cases, b) saves one file page. In some cases, b) wastes one virtual memory page. The waste is a concern on Fuchsia. Because it uses compressed binaries, it doesn't benefit from the saved file page. This patch adds -z separate-loadable-segments to restore the behavior before D64906. It can affect section addresses and can thus be used as a debugging mechanism (see PR43214 and ld.so partition bug in crbug.com/998712). Reviewed By: jakehehrlich, ruiu Differential Revision: https://reviews.llvm.org/D67481 llvm-svn: 372807
* lld-link: Add a flag /lldignoreenv that makes lld-link ignore env vars.Nico Weber2019-09-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for enforcing that builds are independent of the environment; it can be used when all system library paths are added via /libpath: already. It's similar ot cl.exe's /X flag. Since it should also affect %LINK% (the other caller of `Process::GetEnv` in lld/COFF), the early-option-parsing needs to move around a bit. The options are: - Add a manual loop over the argv ArrayRef and look for "/lldignoreenv". This repeats the name of the flag in both Options.td and in DriverUtils.cpp. - Add yet another table.ParseArgs() call just for /lldignoreenv before adding %LINK%. - Use the existing early ParseArgs() that's there for --rsp-quoting and use it for /lldignoreenv for %LINK% as well. This means --rsp-quoting and /lldignoreenv can't be passed via %LINK%. I went with the third approach. Differential Revision: https://reviews.llvm.org/D67456 llvm-svn: 371852
* lld-link: Make /linkrepro: take a filename, not a directory.Nico Weber2019-09-121-0/+3
| | | | | | | | | | | | This makes lld-link behave like ld.lld. I don't see a reason for the two drivers to have different behavior here. While here, also make lld-link add a version.txt to the tar, like ld.lld does. Differential Revision: https://reviews.llvm.org/D67461 llvm-svn: 371729
* 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
* [WebAssembly] Implement NO_STRIPDan Gohman2019-08-292-2/+5
| | | | | | | | | | | | | 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
* [ELF] Mention contents of reproduce archive and add help description.Peter Smith2019-08-231-2/+5
| | | | | | | | | | | | 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
* Bump the trunk version to 10.0.0svnHans Wennborg2019-07-182-34/+8
| | | | | | and clear the release notes. llvm-svn: 366427
* Add --undefined-glob which is an --undefined with wildcard pattern matchRui Ueyama2019-06-141-2/+16
| | | | | | | | | | | | | | | | | | | | | This patch adds new command line option `--undefined-glob` to lld. That option is a variant of `--undefined` but accepts wildcard patterns so that all symbols that match with a given pattern are handled as if they were given by `-u`. `-u foo` is to force resolve symbol foo if foo is not a defined symbol and there's a static archive that contains a definition of symbol foo. Now, you can specify a wildcard pattern as an argument for `--undefined-glob`. So, if you want to include all JNI symbols (which start with "Java_"), you can do that by passing `--undefined-glob "Java_*"` to the linker, for example. In this patch, I use the same glob pattern matcher as the version script processor is using, so it does not only support `*` but also `?` and `[...]`. Differential Revision: https://reviews.llvm.org/D63244 llvm-svn: 363396
* docs: Update partitioning docs now that the feature is fully landed.Peter Collingbourne2019-06-071-3/+2
| | | | llvm-svn: 362831
* [ELF][AArch64] Support for BTI and PACPeter Smith2019-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add --sort-common to the man page.Rui Ueyama2019-06-031-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D62799 llvm-svn: 362354
* [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
* Add IR support, ELF section and user documentation for partitioning feature.Peter Collingbourne2019-05-294-0/+250
| | | | | | | | | | | | The partitioning feature was proposed here: http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html This is mostly just documentation. The feature itself will be contributed in subsequent patches. Differential Revision: https://reviews.llvm.org/D60242 llvm-svn: 361923
* Add release note entries for recent typo correction changesNico Weber2019-05-281-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D62523 llvm-svn: 361824
* [docs] Fix troff macro (.F1 -> .Fl) in ld.lld.1Fangrui Song2019-05-221-2/+2
| | | | llvm-svn: 361345
* [LLD][ELF] Add the -z ifunc-noplt optionFangrui Song2019-05-141-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Mark Johnston! Summary: When the option is configured, ifunc calls do not go through the PLT; rather, they appear as regular function calls with relocations referencing the ifunc symbol, and the resolver is invoked when applying the relocation. This is intended for use in freestanding environments where text relocations are permissible and is incompatible with the -z text option. The option is motivated by ifunc usage in the FreeBSD kernel, where ifuncs are used to elide CPU feature flag bit checks in hot paths. Instead of replacing the cost of a branch with that of an indirect function call, the -z ifunc-noplt option is used to ensure that ifunc calls carry no hidden overhead relative to normal function calls. Test Plan: I added a couple of regression tests and tested the FreeBSD kernel build using the latest lld sources. To demonstrate the effects of the change, I used a micro-benchmark which results in frequent invocations of a FreeBSD kernel ifunc. The benchmark was run with and without IBRS enabled, and with and without -zifunc-noplt configured. The observed speedup is small and consistent, and is significantly larger with IBRS enabled: https://people.freebsd.org/~markj/ifunc-noplt/noibrs.txt https://people.freebsd.org/~markj/ifunc-noplt/ibrs.txt Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D61613 llvm-svn: 360685
* [ELF] Full support for -n (--nmagic) and -N (--omagic) via common pagePeter Smith2019-05-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | The -n (--nmagic) disables page alignment, and acts as a -Bstatic The -N (--omagic) does what -n does but also marks the executable segment as writeable. As page alignment is disabled headers are not allocated unless explicit in the linker script. To disable page alignment in LLD we choose to set the page sizes to 1 so that any alignment based on the page size does nothing. To set the Target->PageSize to 1 we implement -z common-page-size, which has the side effect of allowing the user to set the value as well. Setting the page alignments to 1 does mean that any use of CONSTANT(MAXPAGESIZE) or CONSTANT(COMMONPAGESIZE) in a linker script will return 1, unlike in ld.bfd. However given that -n and -N disable paging these probably shouldn't be used in a linker script where -n or -N is in use. Differential Revision: https://reviews.llvm.org/D61688 llvm-svn: 360593
* lld-link: Add /force:multipleres extension to make dupe resource diag non-fatalNico Weber2019-05-021-0/+1
| | | | | | | As a side benefit, lld-link now reports more than one duplicate resource entry before exiting with an error even if the new flag is not passed. llvm-svn: 359829
* Add more lld release notesNico Weber2019-04-291-0/+3
| | | | llvm-svn: 359518
* Add some lld-link 9.0 release notesNico Weber2019-04-291-0/+11
| | | | llvm-svn: 359412
* [docs] Copy-edit lld/docs/WebAssembly.rstSam Clegg2019-04-241-17/+14
| | | | | | | | | | | Fixes small typos in WebAssembly documentation. I first noticed the sub-heading "Bahavior", and then decided to review the whole file. Patch by Christoph Siedentop! Differential Revision: https://reviews.llvm.org/D60987 llvm-svn: 359103
* [COFF] Link crtend.o as the last object fileMartin Storsjo2019-04-151-1/+3
| | | | | | | | | | | | | | | | | | When faced with command line options such as "crtbegin.o appmain.o -lsomelib crtend.o", GNU ld pulls in all necessary object files from somelib before proceeding to crtend.o. LLD operates differently, only loading object files from any referenced static libraries after processing all input object files. This uses a similar hack as in the ELF linker. Here, it moves crtend.o to the end of the vector of object files. This makes sure that terminator chunks for sections such as .eh_frame gets ordered last, fixing DWARF exception handling for libgcc and gcc's crtend.o. Differential Revision: https://reviews.llvm.org/D60628 llvm-svn: 358394
* Fix two sphinx warningsHans Wennborg2019-04-111-2/+2
| | | | llvm-svn: 358155
* Reland "[Remarks] Add -foptimization-record-passes to filter remark emission"Francis Visoiu Mistrih2019-03-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization-record, there is no way to filter the remarks while generating them. This adds support for filtering remarks by passes using a regex. Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline` will only emit the remarks coming from the pass `inline`. This adds: * `-fsave-optimization-record` to the driver * `-opt-record-passes` to cc1 * `-lto-pass-remarks-filter` to the LTOCodeGenerator * `--opt-remarks-passes` to lld * `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2 * `-opt-remarks-passes` to gold-plugin Differential Revision: https://reviews.llvm.org/D59268 Original llvm-svn: 355964 llvm-svn: 355984
* Revert "[Remarks] Add -foptimization-record-passes to filter remark emission"Francis Visoiu Mistrih2019-03-121-3/+0
| | | | | | This reverts commit 20fff32b7d1f1a1bd417b22aa9f26ededd97a3e5. llvm-svn: 355976
* [Remarks] Add -foptimization-record-passes to filter remark emissionFrancis Visoiu Mistrih2019-03-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization-record, there is no way to filter the remarks while generating them. This adds support for filtering remarks by passes using a regex. Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline` will only emit the remarks coming from the pass `inline`. This adds: * `-fsave-optimization-record` to the driver * `-opt-record-passes` to cc1 * `-lto-pass-remarks-filter` to the LTOCodeGenerator * `--opt-remarks-passes` to lld * `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2 * `-opt-remarks-passes` to gold-plugin Differential Revision: https://reviews.llvm.org/D59268 llvm-svn: 355964
* [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
* 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
* [WebAssembly] Don't generate invalid modules when function signatures mismatchSam Clegg2019-02-201-0/+20
| | | | | | | | | | | | Previously we could emit a warning and generate a potentially invalid wasm module (due to call sites and functions having conflicting signatures). Now, rather than create invalid binaries we handle such cases by creating stub functions containing unreachable, effectively turning these into runtime errors rather than validation failures. Differential Revision: https://reviews.llvm.org/D57909 llvm-svn: 354528
OpenPOWER on IntegriCloud