| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51045
llvm-svn: 340692
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51095
llvm-svn: 340635
|
|
|
|
| |
llvm-svn: 340616
|
|
|
|
|
|
|
| |
I removed the ".exe" regex in the wrong place. lld-link in front of the
"error:" no longer has the suffix; the --plugin-opt diagnostic still has it.
llvm-svn: 340590
|
|
|
|
|
|
|
|
| |
This reverts commit 5125b44dbb5d06b715213e4bec75c7346bfcc7d3.
ppc64-dq.s and ppc64-error-missaligned-dq.s fail on several of the build-bots.
Reverting to investigate.
llvm-svn: 340568
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the handling of *_DS relocations used on DQ-form instructions where we
were overwriting some of the extended opcode bits. Also adds an alignment check
so that the user will receive a diagnostic error if the value we are writing
is not properly aligned.
Differential Revision: https://reviews.llvm.org/D51124
llvm-svn: 340564
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D51050
llvm-svn: 340555
|
|
|
|
|
|
|
|
|
|
|
| |
This is a minor follow-up to https://reviews.llvm.org/D49189. On Windows, lld
used to print "lld-link.exe: error: ...". Now it just prints "lld-link: error:
...". This matches what link.exe does (it prints "LINK : ...") and makes lld's
output less dependent on the host system.
https://reviews.llvm.org/D51133
llvm-svn: 340487
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
newline() in ErrorHandler.cpp already tries to insert newlines between messages
that contain embedded newlines, so getSymbolLocations() shouldn't return a
string that ends in a newline -- else we end up with two newlines between error
messages.
Makes lld-link's output look more like ld.lld output.
https://reviews.llvm.org/D51117
llvm-svn: 340482
|
|
|
|
|
|
| |
https://reviews.llvm.org/D51140
llvm-svn: 340481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a rebased version https://reviews.llvm.org/D42176 which is patch
by Nicolas Wilson.
Addresses issue:
https://github.com/WebAssembly/tool-conventions/issues/32, and
https://bugs.llvm.org/show_bug.cgi?id=38650
Previously, for each function/segment we iterated over every relocation
to find the relevant ones, which is an n^2 operation. Now, we just make
a single pass.
Differential Revision: https://reviews.llvm.org/D51063
llvm-svn: 340428
|
|
|
|
|
|
|
|
|
| |
exist and no /subsystem: flag is passed.
Similar to link.exe's LNK4031.
https://reviews.llvm.org/D51076
llvm-svn: 340420
|
|
|
|
|
|
|
|
| |
This relocation has only 6-bits the remaining are in the extender.
Differential Revision: https://reviews.llvm.org/D50603
llvm-svn: 340413
|
|
|
|
| |
llvm-svn: 340400
|
|
|
|
|
|
|
|
|
|
| |
In most of these cases, it's easy to go on despite the error,
printing as many valuable error messages as possible from one run
as possible.
Differential Revision: https://reviews.llvm.org/D51087
llvm-svn: 340399
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have an issue with -wrap that the option doesn't work well when
renamed symbols get PLT entries. I'll explain what is the issue and
how this patch solves it.
For one -wrap option, we have three symbols: foo, wrap_foo and real_foo.
Currently, we use memcpy to overwrite wrapped symbols so that they get
the same contents. This works in most cases but doesn't when the relocation
processor sets some flags in the symbol. memcpy'ed symbols are just
aliases, so they always have to have the same contents, but the
relocation processor breaks that assumption.
r336609 is an attempt to fix the issue by memcpy'ing again after
processing relocations, so that symbols that are out of sync get the
same contents again. That works in most cases as well, but it breaks
ASan build in a mysterious way.
We could probably fix the issue by choosing symbol attributes that need
to be copied after they are updated. But it feels too complicated to me.
So, in this patch, I fixed it once and for all. With this patch, we no
longer memcpy symbols. All references to renamed symbols point to new
symbols after wrapSymbols() is done.
Differential Revision: https://reviews.llvm.org/D50569
llvm-svn: 340387
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Before this change, pruning order was based on size. This changes it
to be based on time of last use instead, preferring to keep recently
used files and prune older ones.
Reviewers: pcc, rnk, espindola
Reviewed By: rnk
Subscribers: emaste, arichardson, hiraditya, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D51062
llvm-svn: 340374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with old suffix
Summary:
For -thinlto-object-suffix-replace=old\;new, in
tools/gold/gold-plugin.cpp, the thinlto object filename is Path minus
optional old suffix.
static std::string getThinLTOObjectFileName(StringRef Path, StringRef OldSuffix,
StringRef NewSuffix) {
if (OldSuffix.empty() && NewSuffix.empty())
return Path;
StringRef NewPath = Path;
NewPath.consume_back(OldSuffix);
std::string NewNewPath = NewPath;
NewNewPath += NewSuffix;
return NewNewPath;
}
Currently lld will error that the path does not end with old suffix.
This patch makes lld accept such paths but only add new suffix if Path
ends with old suffix. This fixes a link error where bitcode members in
an archive are regular LTO objects without old suffix.
Acording to tejohnson, this will "enable supporting mix and match of
minimized ThinLTO bitcode files with normal ThinLTO bitcode files in a
single link (where we want to apply the suffix replacement to the
minimized files, and just ignore it for the normal ThinLTO files)."
Reviewers: ruiu, pcc, tejohnson, espindola
Reviewed By: tejohnson
Subscribers: emaste, inglorion, arichardson, eraman, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D51055
llvm-svn: 340364
|
|
|
|
|
|
|
|
|
| |
This patch adds the target call back relaxTlsIeToLe to support TLS relaxation
from initial exec to local exec model.
Differential Revision: https://reviews.llvm.org/D48091
llvm-svn: 340281
|
|
|
|
|
|
| |
Renamed Filecheck->FileCheck.
llvm-svn: 340259
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our code in LazyObjFile::parse() has an ELFT switch and
adds a lazy object by its ELFT kind.
Though it might be possible to add a file using a different
architecture and make LLD to silently accept it (if the file
is empty or contains only week symbols). That itself, not a
huge issue perhaps (because the error would be reported later
if the file is fetched), but still does not look clean and correct.
It is possible to report an error earlier and clean up the
code. That is what the patch does.
Ideally, we might want to reuse isCompatible from SymbolTable.cpp,
but it is static and accepts a file as an argument, what is not
convenient. Since such a situation should be rare, I think it
should be OK to go with the way chosen in this patch.
Differential revision: https://reviews.llvm.org/D50899
llvm-svn: 340257
|
|
|
|
| |
llvm-svn: 340253
|
|
|
|
|
|
|
|
|
| |
This fixes the following warning when compiling with gcc version 8.0.1 20180319 (experimental) (GCC):
/home/umb/LLVM/llvm/tools/lld/ELF/SyntheticSections.cpp:1951:46: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
return OS->SectionIndex >= SHN_LORESERVE ? SHN_XINDEX : OS->SectionIndex;
llvm-svn: 340164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older Arm architectures do not support the MOVT and MOVW instructions so we
must use an alternative sequence of instructions to transfer control to the
destination.
Assuming at least Armv5 this patch adds support for Thunks that load or add
to the program counter. Note that there are no Armv5 Thumb Thunks as there
is no Thumb branch instruction in Armv5 that supports Thunks. These thunks
will not work for Armv4t (arm7tdmi) as this architecture cannot change state
from using the LDR or ADD instruction.
Differential Revision: https://reviews.llvm.org/D50077
llvm-svn: 340160
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Thumb BL and BLX instructions on older Arm Architectures such as v5 and
v6 have a constrained encoding J1 and J2 must equal 1, later Architectures
relaxed this restriction allowing J1 and J2 to be used to calculate a larger
immediate.
This patch adds support for the old encoding, it is used when the build
attributes for the input objects only contain older architectures.
Differential Revision: https://reviews.llvm.org/D50076
llvm-svn: 340159
|
|
|
|
|
|
| |
applyMask(0xffffffff, x) is an identity function.
llvm-svn: 340152
|
|
|
|
|
|
|
|
|
| |
LEB compression breaks debug info so we don't want to enable
it by default, even at high optimization levels.
Differential Revision: https://reviews.llvm.org/D50729
llvm-svn: 340073
|
|
|
|
|
|
| |
These lines were unused.
llvm-svn: 340011
|
|
|
|
| |
llvm-svn: 339913
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This prefix was added in r333421, and it changed our dumper output to
say things like "CVRegEAX" instead of just "EAX". That's a functional
change that I'd rather avoid.
I tested GCC, Clang, and MSVC, and all of them support #pragma
push_macro. They don't issue warnings whem the macro is not defined
either.
I don't have a Mac so I can't test the real termios.h header, but I
looked at the termios.h sources online and looked for other conflicts.
I saw only the CR* macros, so those are the ones we work around.
Reviewers: zturner, JDevlieghere
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D50851
llvm-svn: 339907
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This makes it conform to what the comment says. Otherwise when getErrPlace() is called afterwards, cast<InputSection>(D) will cause incompatible cast as MergeInputSection is not a subclass of InputSection.
Reviewers: ruiu, grimar, espindola, pcc
Reviewed By: grimar
Subscribers: emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D50742
llvm-svn: 339904
|
|
|
|
|
|
|
| |
This covers a following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L899
llvm-svn: 339880
|
|
|
|
|
|
|
| |
This covers the following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L487
llvm-svn: 339876
|
|
|
|
|
|
|
| |
To cover the following error message:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L463
llvm-svn: 339867
|
|
|
|
|
|
| |
This rewrites the test using yaml.
llvm-svn: 339775
|
|
|
|
|
|
| |
This removes test that used binary input and adds a yaml based test instead.
llvm-svn: 339774
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch solves 2 problems:
1) It adds a test to check the line below:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L334
Test case contains SHT_GROUP section with a broken (0xFF) flag.
2) The patch fixes the case when we silently accepted such broken groups
in the case when there were no other objects with the same group signature.
llvm-svn: 339765
|
|
|
|
|
|
|
|
|
| |
We have a dead piece of code there which is impossible to trigger
using regular objects I believe.
Patch removes it and adds a test case showing how this condition
can be triggered with use of a broken object and crash the linker.
llvm-svn: 339680
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D50657
llvm-svn: 339677
|
|
|
|
|
|
|
|
| |
The code involved was simply dead. `IgnoreAll` value is used in
`maybeReportUndefined` only which is never called for -r.
And at the same time `IgnoreAll` was set only for -r.
llvm-svn: 339672
|
|
|
|
| |
llvm-svn: 339635
|
|
|
|
| |
llvm-svn: 339626
|
|
|
|
|
|
|
|
| |
Code is dead because R_TLSDESC_CALL is already handled in the
following block of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L231
llvm-svn: 339566
|
|
|
|
|
|
|
|
|
|
| |
That piece of code is really very old and "protected"
from TLS relocations against symbol in non-allocatable sections.
It is useless because normally non-alloc sections have relocations
with allocatable targets, but not the reverse.
And so the code was simply dead.
llvm-svn: 339553
|
|
|
|
|
|
|
|
|
|
| |
This updates znotext-plt-relocations-protected.s test case
(adds a file symbol) to check how the error message is built.
It allows to cover/test the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L79
llvm-svn: 339550
|
|
|
|
|
|
|
| |
This adds a coverage for the following early continue:
https://github.com/llvm-mirror/lld/blob/master/ELF/CallGraphSort.cpp#L200
llvm-svn: 339514
|
|
|
|
| |
llvm-svn: 339510
|
|
|
|
|
|
| |
Add flags to llc RUN lines to keep tests passing.
llvm-svn: 339490
|
|
|
|
|
|
| |
The registers are tied.
llvm-svn: 339487
|
|
|
|
|
|
|
| |
Remove testcase the breaks the assembler parser. Will fix llvm-mc
and put this back afterward.
llvm-svn: 339486
|