Commit Graph

176 Commits

Author SHA1 Message Date
Chandler Carruth 2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Peter Smith 13d134684f [ELF] Implement option to force PIC compatible Thunks
By default LLD will generate position independent Thunks when the --pie or
--shared option is used. Reference to absolute addresses is permitted in
other cases. For some embedded systems position independent thunks are
needed for code that executes before the MMU has been set up. The option
--pic-veneer is used by ld.bfd to force position independent thunks.
    
The patch adds --pic-veneer as the option is needed for the Linux kernel
on Arm.
    
fixes pr39886
    
Differential Revision: https://reviews.llvm.org/D55505

llvm-svn: 351326
2019-01-16 12:09:13 +00:00
Hans Wennborg 1fe469ae6c Bump the trunk version to 9.0.0svn
llvm-svn: 351320
2019-01-16 10:57:02 +00:00
Nico Weber 6a5d94cc08 lld/include/lld/Core/TODO.txt
- fix minor grammar stuff (I'm not a native speaker either, but it's hopefully a net improvement)
- mention that lld/coff is used in production
- update AArch64, ARM to production quality
- remove lld/include/lld/Core/TODO.txt which looks outdated

Differential Revision: https://reviews.llvm.org/D56600

llvm-svn: 351030
2019-01-14 00:45:27 +00:00
Rui Ueyama 4f194250ec Add a release note about MSP430 support.
llvm-svn: 350975
2019-01-11 22:31:35 +00:00
Martin Storsjo 17fb13bb40 [docs] Add a known limitation to the comment about lld supporting GCC/MinGW object files. NFC.
Differential Revision: https://reviews.llvm.org/D56335

llvm-svn: 350465
2019-01-05 10:44:03 +00:00
Fangrui Song f747971bf1 keymethod -> keyfunction
Pointed out by ruiu in rLLD349969

llvm-svn: 349974
2018-12-21 22:57:11 +00:00
Fangrui Song f874871c9e key method -> key function
The latter is what is actually called in the ABI http://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-vtable

Pointed out by rsmith

llvm-svn: 349969
2018-12-21 22:40:10 +00:00
Rui Ueyama afe9673df2 Add a doc for missing key function and an error message referencing the doc.
Summary:
This is a common error, and because many people don't know what the key
function is, it is sometimes very confusing.

The doc was originally written by Brooks Moses and slightly edited by me.

Reviewers: MaskRay, espindola

Subscribers: emaste, llvm-commits, arichardson

Differential Revision: https://reviews.llvm.org/D55968

llvm-svn: 349941
2018-12-21 19:28:49 +00:00
Sam Clegg db8dd23204 [WebAssembly] Update docs
This is an reland of rL343155 which got reverted because
of a sphinx failure on the buildbot.

Differential Revision: https://reviews.llvm.org/D54982

llvm-svn: 347830
2018-11-29 02:55:25 +00:00
George Rimar a1b3ddbfec [ELF] - Implement -z nodefaultlib
This is https://bugs.llvm.org//show_bug.cgi?id=38978

Spec says that:
"Objects may be built with the -z nodefaultlib option to
suppress any search of the default locations at runtime.
Use of this option implies that all the dependencies of an
object can be located using its runpaths.
Without this option, which is the most common case, no
matter how you augment the runtime linker's library
search path, its last element is always /usr/lib for 32-bit
objects and /usr/lib/64 for 64-bit objects."

The patch implements this option.

Differential revision: https://reviews.llvm.org/D54577

llvm-svn: 347647
2018-11-27 09:48:17 +00:00
George Rimar 5f8fc76b4e [LLD][ELF] - Fix mistype. NFC.
llvm-svn: 347485
2018-11-23 07:59:28 +00:00
Sam Clegg bfb75348e2 [WebAssembly] Initial support for shared objects (-shared)
Based on the initial spec proposal:
https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md

The llvm/codegen side of this is still missing but I believe this change is
still worth landing as an incremental step

Differential Revision: https://reviews.llvm.org/D54249

llvm-svn: 346918
2018-11-15 00:37:21 +00:00
Rui Ueyama c2921f002e Add an entry to the release notes.
llvm-svn: 344062
2018-10-09 17:53:33 +00:00
Martin Storsjo db9148d21d [docs] Mention some notable feature in the release notes
Differential Revision: https://reviews.llvm.org/D52908

llvm-svn: 343878
2018-10-05 19:43:20 +00:00
Ed Maste bf378b808a ReleaseNotes: remove superfluous 's' in 'can promotes'
llvm-svn: 343820
2018-10-04 21:37:32 +00:00
Ali Tamur 63830b2794 Introduce a flag to warn when ifunc symbols are used with text relocations.
Summary:
This patch adds a new flag, --warn-ifunc-textrel, to work around a glibc bug. When a code with ifunc symbols is used to produce an object file with text relocations, lld always succeeds. However, if that object file is linked using an old version of glibc, the resultant binary just crashes with segmentation fault when it is run (The bug is going to be corrected as of glibc 2.19).

Since there is no way to tell beforehand what library the object file will be linked against in the future, there does not seem to be a fool-proof way for lld to give an error only in cases where the binary will crash. So, with this change (dated 2018-09-25), lld starts to give a warning, contingent on a new command line flag that does not have a gnu counter part. The default value for --warn-ifunc-textrel is false, so lld behaviour will not change unless the user explicitly asks lld to give a warning. Users that link with a glibc library with version 2.19 or newer, or does not use ifunc symbols, or does not generate object files with text relocations do not need to take any action. Other users may consider to start passing warn-ifunc-textrel to lld to get early warnings.

Reviewers: ruiu, espindola

Reviewed By: ruiu

Subscribers: grimar, MaskRay, markj, emaste, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D52430

llvm-svn: 343628
2018-10-02 20:30:22 +00:00
Rui Ueyama 1e591d807b Add an explanation about cross linking.
Differential Revision: https://reviews.llvm.org/D52567

llvm-svn: 343495
2018-10-01 16:41:58 +00:00
James Henderson 194a4eb8f7 Fix typo in LLD man page
llvm-svn: 343449
2018-10-01 09:57:20 +00:00
Sam Clegg bd37e09355 Revert "[WebAssembly] Update docs"
This change reverts rL343155.  It broke the builtbot, even though
it works for me locally:
http://lab.llvm.org:8011/builders/lld-sphinx-docs/builds/26336

Must be a sphinx version issue I guess.

llvm-svn: 343156
2018-09-27 00:42:49 +00:00
Sam Clegg 77ab7c1b30 [WebAssembly] Update docs
Differential Revision: https://reviews.llvm.org/D52048

llvm-svn: 343155
2018-09-27 00:22:24 +00:00
Rui Ueyama 378a028d91 Update a --help message and add -execute-only to the man page.
llvm-svn: 343032
2018-09-25 21:39:08 +00:00
George Rimar b5a6538b07 [ELF] - Add -z global option to manual.
This was requested during review of D49374,
but for some unknown reason was not in the final commit.

llvm-svn: 342954
2018-09-25 09:32:31 +00:00
Ed Maste c8ec7a9e1e Correct RISC-V link in release notes
llvm-svn: 342887
2018-09-24 14:47:56 +00:00
Rui Ueyama c41985a50e Update release notes.
llvm-svn: 342754
2018-09-21 17:48:45 +00:00
Rui Ueyama a3d0f40964 Update release notes.
llvm-svn: 342748
2018-09-21 17:13:55 +00:00
Ed Maste c0b474f67a lld: add -z interpose support
-z interpose sets the DF_1_INTERPOSE flag, marking the object as an
interposer.

Via FreeBSD PR 230604, linking Valgrind with lld failed.

Differential Revision:	https://reviews.llvm.org/D52094

llvm-svn: 342239
2018-09-14 14:25:37 +00:00
Hans Wennborg 8ec9b16f27 ReleaseNotes: update links to use https
llvm-svn: 341788
2018-09-10 08:52:31 +00:00
Fangrui Song 3a84a093f2 [docs] Add --print-icf-sections to ld.lld.1
llvm-svn: 340253
2018-08-21 07:35:23 +00:00
Hans Wennborg 5f3be212b1 Update docs version and clear release notes after 8.0.0 version bump
llvm-svn: 338558
2018-08-01 14:07:20 +00:00
Hans Wennborg 1cc3f51b04 windows_support.rst: Add links for downloading
llvm-svn: 338363
2018-07-31 12:02:03 +00:00
Hans Wennborg c7792a6cc7 index.rst: pe/coff does support pdbs now
llvm-svn: 338362
2018-07-31 12:00:26 +00:00
Fangrui Song f35ff042f4 [docs] Sort ld.lld.1 options
Reviewers: ruiu

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D50022

llvm-svn: 338326
2018-07-30 23:07:44 +00:00
Fangrui Song bac187bece [docs] Add missing options to ld.lld.1
Differential Revision: https://reviews.llvm.org/D49938

llvm-svn: 338320
2018-07-30 22:31:00 +00:00
Fangrui Song 05779bfcc8 [docs] Update ld.lld.1
llvm-svn: 338275
2018-07-30 17:36:38 +00:00
Peter Collingbourne a327a4c34e ELF: Implement --icf=safe using address-significance tables.
Differential Revision: https://reviews.llvm.org/D48146

llvm-svn: 337429
2018-07-18 22:49:31 +00:00
Rui Ueyama f75ea0b995 Implement --{push,pop}-state.
--push-state implemented in this patch saves the states of --as-needed,
--whole-archive and --static. It saves less number of flags than GNU linkers.
Since even GNU linkers save different flags, no one seems to care about the
details. In this patch, I tried to save the minimal number of flags to not
complicate the implementation and the siutation.

I'm not personally happy about adding the --{push,pop}-state flags though.
That options seem too hacky to me. However, gcc started using the options
since GCC 8 when GNU ld is available at the build time. Therefore, lld
is no longer a drop-in replacmenet for GNU linker for that machine
without supporting the flags.

Fixes https://bugs.llvm.org/show_bug.cgi?id=34567

Differential Revision: https://reviews.llvm.org/D47542

llvm-svn: 333646
2018-05-31 13:00:25 +00:00
Sam Clegg 262e09018b [WebAssembly] Remove final -wasm component of target triple. NFC.
This has been the default for a while now.

llvm-svn: 332009
2018-05-10 17:59:41 +00:00
Ed Maste 59c4962c1d Add -warn-backrefs (r329636) to lld's man page
llvm-svn: 331133
2018-04-29 02:18:48 +00:00
Ed Maste dfcd846b26 Update man page for long opts that accept = after r326506
Also remove the space between --lto-O and value, as the option with a
space is not accepted at present.

Leave --opt-remarks-filename as it does not currently accept the = form.

llvm.org/pr36563

llvm-svn: 326536
2018-03-02 02:57:12 +00:00
Ed Maste 9a289f7b72 Correct man page description for --section-start
The argument is section=address, not just address.

(For compatibility with GNU linkers we need to, but do not yet, accept
--section-start=section=address.)

llvm-svn: 326463
2018-03-01 19:02:41 +00:00
Ed Maste dde3a9170c Where possible use --long-opt=value in lld man page
We intend to maintain compatibility with GNU ld, and in the GNU world
long options are conventionally specified as --long-option=value. For
whatever reason GNU ld.bfd accepts both --long-option value and
--long-option=value, but documents the former. Follow suit.

Some lld long options do not accept the = form; this is probably a bug
to be fixed (along with a man page update).

Reported by Ingo Schwarze, for --entry.

llvm-svn: 326459
2018-03-01 18:40:11 +00:00
Ed Maste a83e226c2f Correct markup and nits in ld.lld man page
Patch by Ingo Schwarze

llvm-svn: 326446
2018-03-01 16:02:19 +00:00
Hans Wennborg ff52eb5927 ReleaseNotes: user lower-case for lld in the text
llvm-svn: 325869
2018-02-23 08:27:38 +00:00
Zachary Turner 401b2a463c Update lld documentation to mention PDB support.
Differential Revision: https://reviews.llvm.org/D43636

llvm-svn: 325821
2018-02-22 19:12:57 +00:00
Ed Maste 1136f3f0fd Add IMPLEMENTATION NOTES describing lld's .a handling in the man page
This content is based on the description in NewLLD.rst.

Differential Revision:	https://reviews.llvm.org/D43072

llvm-svn: 324739
2018-02-09 15:36:13 +00:00
Ed Maste 421fdaa121 Document --build-id=fast in ld.lld.1
Initial ld.lld.1 man page commit in r324512 crossed paths with r324502
which added --build-id=fast, allowing --build-id to be documented as a
synonym for --build-id=fast. Catch up with that change in the man page.

Differential Revision:	https://reviews.llvm.org/D43039

llvm-svn: 324528
2018-02-07 21:22:20 +00:00
Ed Maste 3a775a17ca Add ld.lld.1 man page, describing lld's ELF linker
One of the FreeBSD requirements for enabling lld as the system linker is
that it has a man page. Other FreeBSD developers and I created one using
lld's --help output as a starting point.  This is an expanded and
improved version of that.

This man page would benefit from additional content, but it provides
basic user-facing coverage of lld's options and serves as a good
starting point.

Differential Revision:	https://reviews.llvm.org/D42963

llvm-svn: 324512
2018-02-07 20:38:18 +00:00
Hans Wennborg b7f377a863 Docs, release notes: update version to 7.0.0
llvm-svn: 321729
2018-01-03 15:51:31 +00:00
Sam Clegg e8a4d5f808 [docs] Update doc building instructions
Differential Revision: https://reviews.llvm.org/D39984

llvm-svn: 319857
2017-12-05 23:31:26 +00:00