| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
InitTargetOptionsFromCodeGenFlags/ParseCommandLineOptions for parsing LTO options."
It broke BB:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/8162
llvm-svn: 324332
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parsing LTO options.
gold plugin uses InitTargetOptionsFromCodeGenFlags +
ParseCommandLineOptions for parsing LTO options.
Patch do the same change for LLD.
Such change helps to avoid parsing/whitelisting LTO
plugin options again on linker side, what can help LLD
to automatically support new -plugin-opt=xxx options
passed.
Differential revision: https://reviews.llvm.org/D42733
llvm-svn: 324322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds some initial support for Windows control flow guard. At
the end of the day, the linker needs to synthesize a table of RVAs very
similar to the structured exception handler table (/safeseh).
Both /safeseh and /guard:cf take sections of symbol table indices
(.sxdata and .gfids$y) and turn them into RVA tables referenced by the
load config struct in the CRT through special symbols.
Reviewers: ruiu, amccarth
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42592
llvm-svn: 324306
|
|
|
|
|
|
|
|
| |
GNU gold has these options.
Differential Revision: https://reviews.llvm.org/D42929
llvm-svn: 324300
|
|
|
|
| |
llvm-svn: 324297
|
|
|
|
|
|
|
| |
The difference is that WriteAddends also takes IsRela into
consideration.
llvm-svn: 324271
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Elf_Rela every tool should use the addend in the
relocation.
We have --apply-dynamic-relocs to work around bugs in tools that don't
do that.
The default value of --apply-dynamic-relocs should be false to make
sure these bugs are more easily found in the future.
llvm-svn: 324264
|
|
|
|
|
|
|
| |
Any multi-character option that doesn't start with "o" should be
allowed to start both with "-" and "--".
llvm-svn: 324262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When resolving dynamic RELA relocations the addend is taken from the
relocation and not the place being relocated. Accordingly lld does not
write the addend field to the place like it would for a REL relocation.
Unfortunately there is some system software, in particlar dynamic loaders
such as Bionic's linker64 that use the value of the place prior to
relocation to find the offset that they have been loaded at. Both gold
and bfd control this behavior with the --[no-]apply-dynamic-relocs option.
This change implements the option and defaults it to true for compatibility
with gold and bfd.
Differential Revision: https://reviews.llvm.org/D42797
llvm-svn: 324221
|
|
|
|
|
|
|
|
|
|
| |
We did not report valid filename for duplicate symbol error when
symbol came from binary input file.
Patch fixes it.
Differential revision: https://reviews.llvm.org/D42635
llvm-svn: 324217
|
|
|
|
|
|
|
|
|
|
|
|
| |
Group all synthetic symbols in the in single struct to match
the ELF linker.
This change is part of a larger change to add more linker
symbols such as `_end` and `_edata`.
Differential Revision: https://reviews.llvm.org/D42866
llvm-svn: 324157
|
|
|
|
| |
llvm-svn: 324155
|
|
|
|
| |
llvm-svn: 324154
|
|
|
|
|
|
|
|
| |
GNU linkers have this option.
Differential Revision: https://reviews.llvm.org/D42858
llvm-svn: 324150
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42823
llvm-svn: 324146
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42865
llvm-svn: 324145
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42859
llvm-svn: 324141
|
|
|
|
|
|
|
| |
Was suggested during review of D42635, because
linking an .s file as a binary file was confusing.
llvm-svn: 324072
|
|
|
|
|
|
|
|
|
|
|
| |
Initially LLD generates Elf_Rel relocations for O32 ABI and Elf_Rela
relocations for N32 / N64 ABIs. In other words, format of input and
output relocations was always the same. Now LLD generates all output
relocations using Elf_Rel format only. It conforms to ABIs requirement.
The patch suggested by Alexander Richardson.
llvm-svn: 324064
|
|
|
|
| |
llvm-svn: 324045
|
|
|
|
|
|
|
|
|
| |
--nopie was a typo. GNU gold doesn't recognize it. It is also
inconsistent with other options that have --foo and --no-foo.
Differential Revision: https://reviews.llvm.org/D42825
llvm-svn: 324043
|
|
|
|
|
|
|
|
|
| |
Pass --check-signatures to test executions of lld and
fix resulting errors.
Differential Revision: https://reviews.llvm.org/D42661
llvm-svn: 324042
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42827
llvm-svn: 324041
|
|
|
|
|
|
|
|
|
| |
In GNU linkers, the last semicolon is optional. We can't link libstdc++
with lld because of that difference.
Differential Revision: https://reviews.llvm.org/D42820
llvm-svn: 324036
|
|
|
|
|
|
|
|
|
| |
This fixes pr36190.
Thanks to James Henderson for the testcase and for pointing out how to
fix this.
llvm-svn: 323993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently ICF information is output through stderr if the "--verbose"
flag is used. This differs to Gold for example, which uses an explicit
flag to output this to stdout. This commit adds the
"--print-icf-sections" and "--no-print-icf-sections" flags and changes
the output message format for clarity and consistency with
"--print-gc-sections". These messages are still output to stderr if
using the verbose flag. However to avoid intermingled message output to
console, this will not occur when the "--print-icf-sections" flag is
used.
Existing tests have been modified to expect the new message format from
stderr.
Patch by Owen Reynolds.
Differential Revision: https://reviews.llvm.org/D42375
Reviewers: ruiu, rafael
Reviewed by:
llvm-svn: 323976
|
|
|
|
| |
llvm-svn: 323944
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't include type signatures that are not referenced by
some relocation.
We don't include this in the -gc-sections settings since
we are always building the type section from scratch,
just like we do the table elements.
In the future we might want to unify the relocation
processing which is currently done once for gc-sections
and then again for building the sympathetic type and
table sections.
Differential Revision: https://reviews.llvm.org/D42747
llvm-svn: 323931
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
r323164 made lld-link not overwrite import libraries when their
contents haven't changed. MSVC's link.exe does this only when
performing incremental linking. This change makes lld-link's import
library overwriting similarly dependent on whether or not incremental
linking is being performed. This is controlled by the /incremental or
/incremental:no options. In addition, /opt:icf, /opt:ref, and /order
turn off /incremental and issue a warning if /incremental was
specified on the command line.
Reviewers: rnk, ruiu, zturner
Reviewed By: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42716
llvm-svn: 323930
|
|
|
|
|
|
|
|
|
|
| |
See: https://reviews.llvm.org/rL323901
Patch by Nicholas Wilson!
Differential Revision: https://reviews.llvm.org/D42751
llvm-svn: 323903
|
|
|
|
| |
llvm-svn: 323895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Instead of fatal-ing out when missing a type server PDB, insead warn and cache the miss.
Reviewers: rnk, zturner
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42188
llvm-svn: 323893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
While trying to make a linker script behave the same way with lld as it did
with bfd, I discovered that lld currently doesn't diagnose overlapping
output sections. I was getting very strange runtime failures which I
tracked down to overlapping sections in the resulting binary. When linking
with ld.bfd overlapping output sections are an error unless
--noinhibit-exec is passed and I believe lld should behave the same way
here to avoid surprising crashes at runtime.
The patch also uncovered an errors in the tests: arm-thumb-interwork-thunk
was creating a binary where .got.plt was placed at an address overlapping
with .got.
Reviewers: ruiu, grimar, rafael
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D41046
llvm-svn: 323856
|
|
|
|
|
|
|
|
|
|
|
|
| |
absolute symbols.
When there is a duplicate absolute symbol, LLD reports <internal>
instead of known object file name currently.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D42636
llvm-svn: 323849
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Nicholas Allegra.
The spec for ELF on PowerPC:
http://refspecs.linux-foundation.org/elf/elfspec_ppc.pdf
says:
"The PowerPC family uses only the Elf32_Rela relocation entries with
explicit addends."
(EM_PPC64 should be covered by Config->Is64 already.)
Differential Revision: https://reviews.llvm.org/D40826
llvm-svn: 323843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this initial version we only GC symbols with `hidden` visibility since
other symbols we export to the embedder.
We could potentially modify this the future and only use symbols
explicitly passed via `--export` as GC roots.
This version of the code only does GC of data and code. GC for the
types section is coming soon.
Differential Revision: https://reviews.llvm.org/D42511
llvm-svn: 323842
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a simple start entry point input file and have the tests
reference that rather than duplicating these.
This allows more tests to be pure `.test` files rather than
`.ll`.
Differential Revision: https://reviews.llvm.org/D42662
llvm-svn: 323838
|
|
|
|
|
|
|
| |
There is no '%m' substitution, so a literal "%m.so" file was being
generated in the source tree.
llvm-svn: 323820
|
|
|
|
|
|
|
|
|
|
| |
Previously an empty CPU string was passed to the LTO engine which
resulted in a generic CPU for which certain features like NOPL were
disabled. This fixes that.
Patch by Pratik Bhatu!
llvm-svn: 323801
|
|
|
|
| |
llvm-svn: 323796
|
|
|
|
| |
llvm-svn: 323793
|
|
|
|
| |
llvm-svn: 323780
|
|
|
|
|
|
| |
Before this patch orphan sections were not sorted.
llvm-svn: 323779
|
|
|
|
| |
llvm-svn: 323747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently symbols assigned or created by linkerscript are not processed early
enough. As a result it is not possible to version them or assign any other flags/properties.
Patch creates Defined symbols for -defsym and linkerscript symbols early,
so that issue from above can be addressed.
It is based on Rafael Espindola's version of D38239 patch.
Fixes PR34121.
Differential revision: https://reviews.llvm.org/D41987
llvm-svn: 323729
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D42621
llvm-svn: 323725
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I didn't implement the feature in the original patch because I didn't
come up with an idea to do that easily and efficiently. Turned out that
that is actually easy to implement.
In this patch, we collect comdat sections before gc is run and warn on
nonexistent symbols in an order file.
Differential Revision: https://reviews.llvm.org/D42658
llvm-svn: 323699
|
|
|
|
| |
llvm-svn: 323698
|
|
|
|
|
|
|
|
|
|
|
| |
r323476 added support for DW_FORM_line_strp, and incorrectly made that
depend on having a DWARFUnit available. We shouldn't be tracking
.debug_line_str in DWARFUnit after all. After this patch, I can do an
NFC follow up and undo a bunch of the "plumbing" part of r323476.
Differential Revision: https://reviews.llvm.org/D42609
llvm-svn: 323691
|
|
|
|
| |
llvm-svn: 323682
|