| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
This avoids fetching it again from the object.
llvm-svn: 285875
|
| |
|
|
| |
llvm-svn: 285854
|
| |
|
|
|
|
|
|
|
|
| |
DIHelper is a class having only one member, and ObjectFile has
a unique pointer to a DIHelper. So we can directly have ObjectFile
have the member.
Differential Revision: https://reviews.llvm.org/D26223
llvm-svn: 285850
|
| |
|
|
|
|
| |
This will let us simplify the llvm side.
llvm-svn: 285816
|
| |
|
|
|
|
| |
It is just the size of sections() which we were already calling.
llvm-svn: 285811
|
| |
|
|
| |
llvm-svn: 285808
|
| |
|
|
|
|
|
|
|
| |
While ARM is the only currently user we support this is a general
feature.
This avoids a second walk over the sections.
llvm-svn: 285805
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we have SHT_GNU_versym section, it is should be associated with symbol table
section. Usually (and in out implementation) it is .dynsym.
In case when .dynsym is absent (due to broken object for example),
lld crashes in parseVerdefs() when accesses null pointer:
Versym = reinterpret_cast<const Elf_Versym *>(this->ELFObj.base() +
VersymSec->sh_offset) +
this->Symtab->sh_info;
DIfferential revision: https://reviews.llvm.org/D25553
llvm-svn: 285796
|
| |
|
|
|
|
| |
You can now write make<T>(Args) instead of new (alloc<T>()) T(Args).
llvm-svn: 285760
|
| |
|
|
| |
llvm-svn: 285755
|
| |
|
|
|
|
|
|
|
| |
This patch replaces GAlloc<ELFT>::<sometype>.Allocate() with
alloc<sometype<ELFT>>().
Patch by Rui!
llvm-svn: 285748
|
| |
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26070
llvm-svn: 285680
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, we have a lot of BumpPtrAllocators, but all these
allocators virtually have the same lifetime because they are
not freed until the linker finishes its job. This patch aggregates
them into a single allocator.
Differential revision: https://reviews.llvm.org/D26042
llvm-svn: 285452
|
| |
|
|
| |
llvm-svn: 285347
|
| |
|
|
|
|
|
| |
Now that it is easy to create input section and symbols, this is
simple.
llvm-svn: 285322
|
| |
|
|
|
|
| |
This allows us to set a value for it based on -m.
llvm-svn: 285294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having 3 section allocators per file, have 3 for all files.
This is a substantial performance improvement for some cases. Linking
chromium without gc speeds up by 1.065x.
This requires using _exit in fatal since we have to avoid destructing
an InputSection if fatal is called from the constructor.
Thanks to Rui for the suggestion.
llvm-svn: 285290
|
| |
|
|
|
|
|
|
|
|
| |
We used to have one allocator per file, which reduces the advantage of
using an allocator in the first place.
This is a small speed up is most cases. The largest speedup was in
1.014X in chromium no-gc. The largest slowdown was scylla at 1.003X.
llvm-svn: 285205
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch make lld show following details for undefined symbol errors:
- file (line)
- file (function name)
- file (section name + offset)
Differential revision: https://reviews.llvm.org/D25826
llvm-svn: 285186
|
| |
|
|
| |
llvm-svn: 285062
|
| |
|
|
|
|
|
| |
We were already using it in the larger sets/maps. This provides about
1% speedup in linking xul and chromium.
llvm-svn: 284862
|
| |
|
|
|
|
|
| |
Now that only one non-member function is exported from ELFCreator.h.
All the details are handled internally in ELFCreator.cpp file.
llvm-svn: 284786
|
| |
|
|
| |
llvm-svn: 284705
|
| |
|
|
|
|
|
| |
Also replace std::copy with memcpy because in other places we are
using memcpy.
llvm-svn: 284700
|
| |
|
|
| |
llvm-svn: 284699
|
| |
|
|
| |
llvm-svn: 284687
|
| |
|
|
|
|
|
|
|
|
| |
This is not particularly efficient, but does avoid exposing Comdat*
out of LTO.h.
I will send a patch for review with a more efficient interface that
should map nicely to a bitcode symbol table.
llvm-svn: 284413
|
| |
|
|
| |
llvm-svn: 284409
|
| |
|
|
|
|
|
|
|
|
| |
In continue of D25555, this patch fixes possible crash when
we have multiple SHT_MIPS_REGINFO or SHT_MIPS_ABIFLAGS sections.
yaml2obj was used to produce such objects.
Differential revision: https://reviews.llvm.org/D25609
llvm-svn: 284376
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Issue was revealed by AFl and I was able to generate such object using yaml2obj.
When object has more than one SHT_MIPS_OPTIONS,
each except the last one is destroyed after placing into Sections array.
Sections array contains dead pointers finally. LLD may crash then.
Differential revision: https://reviews.llvm.org/D25555
llvm-svn: 284227
|
| |
|
|
|
|
|
|
| |
This fixes PR30665.
Differential Revision: https://reviews.llvm.org/D25495
llvm-svn: 284034
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value greater than UINT32_MAX.
With fix: commit changes from InputFiles.cpp too.
Original commit message:
We have following code in lld, that truncates the alignment value to 32 bit. Big alignment in this case
may give result 0 and crash later.
template <class ELFT>
CommonInputSection<ELFT>::CommonInputSection(std::vector<DefinedCommon *> Syms)
: InputSection<ELFT>(nullptr, &Hdr, "") {
....
for (DefinedCommon *Sym : Syms) {
this->Alignment = std::max<uintX_t>(this->Alignment, Sym->Alignment);
...
}
}
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D25235
llvm-svn: 283738
|
| |
|
|
| |
llvm-svn: 283735
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.ARM.exidx sections have a reverse dependency on the section they have
a SHF_LINK_ORDER dependency on. In other words a .ARM.exidx section is
live only if the executable section it describes is live. We implement
this with a reverse dependency field in InputSection.
Adding the dependency to InputSection is the simplest implementation
but it could be moved out to a separate map if it were found to decrease
performance for non ARM targets.
Differential revision: https://reviews.llvm.org/D25234
llvm-svn: 283734
|
| |
|
|
|
|
|
|
|
|
| |
When sh_info of sumbol table value was set to zero, lld was asserting.
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D25016
llvm-svn: 283562
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously if sh_size of dynamic section was broken,
lld may crash. Or even may not crash if used 32 bits host.
(then value may be truncated to 32 bits when doing pointer arithmetic
and could be just zero).
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D25327
llvm-svn: 283533
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
createELFObj() may call error(...), for example when file is too short.
In that case header is not set and following line lead to crash:
EMachine = ELFObj.getHeader()->e_machine;
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D25233
llvm-svn: 283532
|
| |
|
|
|
|
|
|
|
| |
This patch makes the check for null section stricter,
so it is only allowed for STT_SECTION symbols now.
Differential revision: https://reviews.llvm.org/D25231
llvm-svn: 283426
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Do not merge sections if generating a relocatable object. It makes
the code simpler because we do not need to update relocations addends
to reflect changes introduced by merging. Instead of that we write
such "merge" sections into separate OutputSections and keep SHF_MERGE
/ SHF_STRINGS flags and sh_entsize value to be able to perform merging
later during a final linking.
Differential Revision: http://reviews.llvm.org/D25066
llvm-svn: 283300
|
| |
|
|
| |
llvm-svn: 283229
|
| |
|
|
|
|
|
| |
This conforms to GNU ld/gold behavior and fixes crash in case
excluded section also has associated relocation section
llvm-svn: 283214
|
| |
|
|
|
|
|
|
|
| |
Testcase contains a common symbol with zero alignment,
previously lld would crash, patch fixes that.
Differential revision: https://reviews.llvm.org/D25085
llvm-svn: 283197
|
| |
|
|
| |
llvm-svn: 283101
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was intended to warn on a usage error of an ar command.
I was thinking that false positive would be rare because it
has two guards: it warns only when an archive file has no symbols
and contains at least one file.
Turned out that false positive would probably be not that rare.
You wouldn't intentionally create an object file that contains no
exported symbols, but with conditional compile guards, you could
create such file. If it is for a LTO build, you could create an
archive file containing such file. That means there's no way to
detect the usage error in a reliable manner.
This patch simply removes the warning.
llvm-svn: 282916
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, it warned on any archive file that has no symbol.
It turned out that that is too noisy.
With this patch, it warns on such archive file that contains no file.
Differential Revision: https://reviews.llvm.org/D25111
llvm-svn: 282885
|
| |
|
|
| |
llvm-svn: 282807
|
| |
|
|
|
|
| |
It's better because it's a verb.
llvm-svn: 282763
|
| |
|
|
| |
llvm-svn: 282658
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D24492
llvm-svn: 282656
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D25044
llvm-svn: 282633
|