| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This bug was introduced by http://reviews.llvm.org/rL265059,
where InputSectionBase got Thunks field, which can do memory allocations.
Since InputSectionBase destructors were never called (I count it as another bug),
that caused a memory leak when 2 or more thunks are added to a section.
The fix to is properly call InputSectionBase destructors from ~ObjectFile.
Reviewers: atanasyan, ruiu, rafael
Subscribers: rafael, krasin, pcc
Differential Revision: http://reviews.llvm.org/D18809
llvm-svn: 265497
|
|
|
|
| |
llvm-svn: 265424
|
|
|
|
| |
llvm-svn: 265404
|
|
|
|
| |
llvm-svn: 265386
|
|
|
|
|
|
|
| |
It had been created with a lld version that was producing an invalid
sh_info.
llvm-svn: 265305
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our symbol representation was redundant, and some times would get out of
sync. It had an Elf_Sym, but some fields were copied to SymbolBody.
Different parts of the code were checking the bits in SymbolBody and
others were checking Elf_Sym.
There are two general approaches to fix this:
* Copy the required information and don't store and Elf_Sym.
* Don't copy the information and always use the Elf_Smy.
The second way sounds tempting, but has a big problem: we would have to
template SymbolBody. I started doing it, but it requires templeting
*everything* and creates a bit chicken and egg problem at the driver
where we have to find ELFT before we can create an ArchiveFile for
example.
As much as possible I compared the test differences with what gold and
bfd produce to make sure they are still valid. In most cases we are just
adding hidden visibility to a local symbol, which is harmless.
In most tests this is a small speedup. The only slowdown was scylla
(1.006X). The largest speedup was clang with no --build-id, -O3 or
--gc-sections (i.e.: focus on the relocations): 1.019X.
llvm-svn: 265293
|
|
|
|
|
|
|
|
|
| |
This reverts commit r263664.
The reason we were getting broken files was lld -r, and that has been
fixed.
llvm-svn: 263944
|
|
|
|
|
|
|
|
|
|
| |
For now just treat such sections as non-mergeable.
Resubmit r263660 with test fix.
Differential Revision: http://reviews.llvm.org/D18225
llvm-svn: 263664
|
|
|
|
| |
llvm-svn: 263661
|
|
|
|
|
|
|
|
| |
For now just treat such sections as non-mergeable.
Differential Revision: http://reviews.llvm.org/D18222
llvm-svn: 263660
|
|
|
|
| |
llvm-svn: 263510
|
|
|
|
| |
llvm-svn: 263496
|
|
|
|
|
|
| |
This type is equivalent to Elf_Word type.
llvm-svn: 263397
|
|
|
|
| |
llvm-svn: 263395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which was reverted because included
unrelative changes by mistake.
Original commit message:
[ELF] - Change all messages to lowercase to be consistent.
That is directly opposite to http://reviews.llvm.org/D18045,
which was reverted.
This patch changes all messages to start from lowercase letter if
they were not before.
That is done to be consistent with clang.
Differential revision: http://reviews.llvm.org/D18085
llvm-svn: 263337
|
|
|
|
|
|
| |
This reverts commit r263252 because the change contained unrelated changes.
llvm-svn: 263272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is directly opposite to http://reviews.llvm.org/D18045,
which was reverted.
This patch changes all messages to start from lowercase letter if
they were not before.
That is done to be consistent with clang.
Differential revision: http://reviews.llvm.org/D18085
llvm-svn: 263252
|
|
|
|
|
|
|
| |
In lld we usually avoid hash lookups. In addition to that, IR names are
not fully mangled, so it is best to avoid using them whenever possible.
llvm-svn: 263248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was discussed to make all messages be
lowercase to be consistent with clang.
(also reverts the r263128 which fixed
build bot fail after r263125)
Original commit message:
[ELF] - Consistent spelling for error/warning messages
Previously error and warnings were not consistent in lld.
Some of them started from lowercase letter, others from
uppercase. Also there was one or two which had a dot at the end.
This patch changes all messages to start from uppercase letter if
they were not before.
Differential revision: http://reviews.llvm.org/D18045
llvm-svn: 263240
|
|
|
|
| |
llvm-svn: 263237
|
|
|
|
|
|
| |
This is already a simplification, but will allow much more.
llvm-svn: 263224
|
|
|
|
|
|
| |
pr26878 shows a case where locals have to be in the got.
llvm-svn: 263222
|
|
|
|
|
|
| |
Somehow this slipped by in r263197. Thanks to Rui for noticing.
llvm-svn: 263198
|
|
|
|
|
|
| |
-shared was hiding the fact that the intrinsic wasn't being found.
llvm-svn: 263197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
More generally, appending linkage is a special case that we don't want
to create a SymbolBody for.
Reviewers: rafael, ruiu
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D18012
llvm-svn: 263179
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously error and warnings were not consistent in lld.
Some of them started from lowercase letter, others from
uppercase. Also there was one or two which had a dot at the end.
This patch changes all messages to start from uppercase letter if
they were not before.
Differential revision: http://reviews.llvm.org/D18045
llvm-svn: 263125
|
|
|
|
| |
llvm-svn: 263040
|
|
|
|
|
|
|
|
|
|
|
| |
Each object file compiled in split stack mode will have an empty
section with a special name: .note.GNU-split-stack
We don't support this in linker now, so patch just adds an error out for that.
Differential revision: http://reviews.llvm.org/D17918
llvm-svn: 263039
|
|
|
|
| |
llvm-svn: 263012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Is there any other code needed for correctly handling appending linkage?
Do we need to do something more with @llvm.global_ctors in
SymbolTable.cpp:addBitcodeFile; otherwise the combined bitcode module
won't have all the global ctors.
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17975
llvm-svn: 262992
|
|
|
|
|
|
| |
Thanks to Rui for spotting this.
llvm-svn: 262983
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17974
llvm-svn: 262975
|
|
|
|
|
|
| |
It will come back when we add support for inline asm in .bc files.
llvm-svn: 262972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This causes the issue in PR26872 to go away now that we aren't creating
symbols for the string literals, but that may just be concealing a
deeper problem, so best to keep that PR open.
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17971
llvm-svn: 262968
|
|
|
|
| |
llvm-svn: 262848
|
|
|
|
| |
llvm-svn: 262846
|
|
|
|
| |
llvm-svn: 262835
|
|
|
|
| |
llvm-svn: 262813
|
|
|
|
| |
llvm-svn: 262761
|
|
|
|
| |
llvm-svn: 262685
|
|
|
|
| |
llvm-svn: 262666
|
|
|
|
|
|
|
| |
This makes fatal return T when there is no error. This avoids the need
for quite a few temporaries.
llvm-svn: 262626
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
relocatable output.
There was a known limitation for -r option:
relocations against local symbols were not supported.
For example rel[a].eh_frame sections contained relocations against sections
and that was not supported for -r before. Patch fixes that.
Differential review: http://reviews.llvm.org/D17813
llvm-svn: 262590
|
|
|
|
|
|
| |
RCRAII class was a bit tricky. This patch removes that.
llvm-svn: 262586
|
|
|
|
| |
llvm-svn: 262489
|
|
|
|
| |
llvm-svn: 262225
|
|
|
|
| |
llvm-svn: 262159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the same algorithm as LLD/COFF's ICF. I'm
not going to repeat the same description about how it works, so you
want to read the comment in ICF.cpp in this patch if you want to know
the details. This algorithm should be more powerful than the ICF
algorithm implemented in GNU gold. It can even merge mutually-recursive
functions (which is harder than one might think).
ICF is a fairly effective size optimization. Here are some examples.
LLD: 37.14 MB -> 35.80 MB (-3.6%)
Clang: 59.41 MB -> 57.80 MB (-2.7%)
The lacking feature is "safe" version of ICF. This merges all
identical sections. That is not compatible with a C/C++ language
requirement that two distinct functions must have distinct addresses.
But as long as your program do not rely on the pointer equality
(which is in many cases true), your program should work with the
feature. LLD works fine for example.
GNU gold implements so-called "safe ICF" that identifies functions
that are safe to merge by heuristics -- for example, gold thinks
that constructors are safe to merge because there is no way to
take an address of a constructor in C++. We have a different idea
which David Majnemer suggested that we add NOPs at beginning of
merged functions so that two or more pointers can have distinct
values. We can do whichever we want, but this patch does not
include neither.
http://reviews.llvm.org/D17529
llvm-svn: 261912
|
|
|
|
| |
llvm-svn: 261881
|
|
|
|
| |
llvm-svn: 261880
|