| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D26852
llvm-svn: 287527
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch adds a filename to that error message.
I faced next error when debugged one of FreeBSD port:
error: relocation R_X86_64_PLT32 cannot refer to absolute symbol __tls_get_addr
error message was poor and this patch improves it to show the locations
of symbol declaration and using.
Differential revision: https://reviews.llvm.org/D26508
llvm-svn: 286940
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found this when tried to link lang/ccl FreeBSD port.
Issue is very close to D23201.
This is the reason of lang/ccl port link fail.
GNU assembler 2.17.50 [FreeBSD] 2007-07-03 could generate broken objects,
where notype symbols are associated with symtab:
...
[ 9] .symtab SYMTAB 0000000000000000 00003c78
0000000000006858 0000000000000018 10 803 8
...
192: 000000000000000d 0 NOTYPE LOCAL DEFAULT 9 _cons_org
Patch allows to handle such objects.
Differential revision: https://reviews.llvm.org/D26613
llvm-svn: 286939
|
| |
|
|
| |
llvm-svn: 286804
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(),
getBitcodeProducerString() and hasGlobalValueSummary() now return errors
via their return value rather than via the diagnostic handler.
To make this work, re-implement these functions using non-member functions
so that they can be used without the LLVMContext required by BitcodeReader.
Differential Revision: https://reviews.llvm.org/D26532
llvm-svn: 286623
|
| |
|
|
|
|
|
|
|
|
|
| |
The change in D26502 splits ReaderWriter.h, which contains the APIs
into both the BitReader and BitWriter libraries, into BitcodeReader.h
and BitcodeWriter.h.
Change lld uses to the appropriate split header, removing it
completely in one case where it wasn't needed.
llvm-svn: 286568
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relocations are the last thing that we wore storing a raw section
pointer to and parsing on demand.
With this patch we parse it only once and store a pointer to the
actual data.
The patch also changes where we store it. It is now in
InputSectionBase. Not all sections have relocations, but most do and
this simplifies the logic. It also means that we now only support one
relocation section per section. Given that that constraint is
maintained even with -r with gold bfd and lld, I think it is OK.
llvm-svn: 286459
|
| |
|
|
|
|
|
| |
This version of addRegular is almost identical to the other except
it lacked "size" parameter.
llvm-svn: 286416
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we have both input and output section for .MIPS.abiflags.
Now we have only one class for .MIPS.abiflags, which is MipsAbiFlagsSection.
This class is a synthetic input section.
.MIPS.abiflags sections are handled as regular sections until
the control reaches Writer. Writer then aggregates all sections
whose type is SHT_MIPS_ABIFLAGS to create a single synthesized
input section. The synthesized section is then processed normally
as if it came from an input file.
llvm-svn: 286398
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sections
Previously, we have both input and output sections for .reginfo and
.MIPS.options. Now for each such sections we have one synthetic input
sections: MipsReginfoSection and MipsOptionsSection respectively.
Both sections are handled as regular sections until the control reaches
Writer. Writer then aggregates all sections whose type is SHT_MIPS_REGINFO
or SHT_MIPS_OPTIONS to create a single synthesized input section. In that
moment Writer also save GP0 value to the MipsGp0 field of the corresponding
ObjectFile. This value required for R_MIPS_GPREL16 and R_MIPS_GPREL32
relocations calculation.
Differential revision: https://reviews.llvm.org/D26444
llvm-svn: 286397
|
| |
|
|
|
|
|
| |
It was quite confusing that it had SectionKind of Regular, but was not
actually a InputSection.
llvm-svn: 286379
|
| |
|
|
| |
llvm-svn: 286242
|
| |
|
|
| |
llvm-svn: 286194
|
| |
|
|
| |
llvm-svn: 286193
|
| |
|
|
| |
llvm-svn: 285966
|
| |
|
|
|
|
| |
This avoids duplicating the buffer in InputFile.
llvm-svn: 285965
|
| |
|
|
| |
llvm-svn: 285962
|
| |
|
|
| |
llvm-svn: 285952
|
| |
|
|
|
|
|
|
|
| |
Instead of remembering a raw Elf_Shdr, store the symbol table proper
and the index of the first non local.
This moves error handling upfront and simplifies it.
llvm-svn: 285933
|
| |
|
|
| |
llvm-svn: 285926
|
| |
|
|
| |
llvm-svn: 285918
|
| |
|
|
| |
llvm-svn: 285913
|
| |
|
|
| |
llvm-svn: 285911
|
| |
|
|
| |
llvm-svn: 285906
|
| |
|
|
| |
llvm-svn: 285904
|
| |
|
|
| |
llvm-svn: 285897
|
| |
|
|
| |
llvm-svn: 285888
|
| |
|
|
|
|
| |
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
|