| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
We can just use the existing SoName member variable. It now initially
contains what was in DefaultSoName and is modified if the .so has an
actual soname.
llvm-svn: 301259
|
|
|
|
|
|
|
|
|
|
| |
Start using it in LLD to avoid needing to read bitcode again just to get the
target triple, and in llvm-lto2 to avoid printing symbol table information
that is inappropriate for the target.
Differential Revision: https://reviews.llvm.org/D32038
llvm-svn: 300300
|
|
|
|
| |
llvm-svn: 300297
|
|
|
|
|
|
|
| |
This patch uses DefaultSoName in getSoName instead of in parseSoName.
I think this is more readable. This patch also add comments.
llvm-svn: 300147
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes PR32572.
When
(a) a library has no soname
and (b) library is given on the command line with path (and not through -L/-l flags)
DT_NEEDED entry for such library keeps the path as given.
This behavior is consistent with gold and bfd, and is used in compiler-rt test suite.
This is a second attempt after r300007 got reverted. This time relro-omagic test is
changed in a way to avoid hardcoding the path to the test directory in the objdump'd
binary.
llvm-svn: 300011
|
|
|
|
|
|
| |
This reverts commit r300007. Reason: breaks all the bots.
llvm-svn: 300008
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes PR32572.
When
(a) a library has no soname
and (b) library is given on the command line with path (and not through -L/-l flags)
DT_NEEDED entry for such library keeps the path as given.
This behavior is consistent with gold and bfd, and is used in compiler-rt test suite.
llvm-svn: 300007
|
|
|
|
|
|
|
|
|
|
| |
LogName member was added to construct input file names for logging
only once. This patch does this in a different way. Now toString
caches its results.
Differential Revision: https://reviews.llvm.org/D31546
llvm-svn: 299375
|
|
|
|
| |
llvm-svn: 299115
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, undefined symbol errors are one line like this
and wasn't easy to read.
/ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/Writer.cpp:207: undefined symbol 'lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >::addSection(lld::elf::InputSectionBase*)'
This patch make it more structured like this.
bin/ld.lld: error: undefined symbol: lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0, true>
>>> Referenced by Writer.cpp:207 (/ssd/llvm-project/lld/ELF/Writer.cpp:207)
>>> Writer.cpp.o in archive lib/liblldELF.a
Discussion thread:
http://lists.llvm.org/pipermail/llvm-dev/2017-March/111459.html
Differential Revision: https://reviews.llvm.org/D31481
llvm-svn: 299097
|
|
|
|
| |
llvm-svn: 298403
|
|
|
|
|
|
|
| |
Fix for linux build bot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8144/steps/build/logs/stdio
llvm-svn: 298348
|
|
|
|
|
|
|
|
|
|
|
| |
Patch moves Sections array to
InputFile (root class for input files).
That allows to detemplate GdbIndexSection.
Differential revision: https://reviews.llvm.org/D30976
llvm-svn: 298345
|
|
|
|
|
|
| |
It is the only file type that needs it.
llvm-svn: 298323
|
|
|
|
|
|
|
|
|
|
|
| |
We had a few Config member functions that returns configuration values.
For example, we had is64() which returns true if the target is 64-bit.
The return values of these functions are constant and never change.
This patch is to compute them only once to make it clear that they'll
never change.
llvm-svn: 298168
|
|
|
|
| |
llvm-svn: 297107
|
|
|
|
| |
llvm-svn: 296162
|
|
|
|
|
|
|
| |
Now that InputSectionBase is not a template there is no reason to have
the two.
llvm-svn: 295924
|
|
|
|
|
|
|
| |
Removing this template is not a big win by itself, but opens the way
for removing more templates.
llvm-svn: 295923
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we stored kept locals in a KeptLocalSyms arrays,
belonged to files.
Patch makes SymbolTableSection to store locals in Symbols member,
that already present and was used for globals.
SymbolTableSection already had NumLocals counter member, so change
itself is trivial.
That allows to simplify handling of -r,
Body::DynsymIndex is no more used as "symbol table index" for relocatable
output.
Change was suggested during review of D28773 and opens road for D28612.
Differential revision: https://reviews.llvm.org/D29021
llvm-svn: 292789
|
|
|
|
|
|
|
|
| |
Previously, files added using INCLUDE directive weren't added
to reproduce archives. In this patch, I defined a function to
open a file and use that from Driver and LinkerScript.
llvm-svn: 291413
|
|
|
|
|
|
| |
The two overloaded functions hid each other. This patch merges them.
llvm-svn: 291222
|
|
|
|
| |
llvm-svn: 287945
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have different functions to stringize objects to construct
error messages. For InputFile, we have getFilename, and for
InputSection, we have getName. You had to memorize them.
I think this is the case where the function overloading comes in handy.
This patch defines toString() functions that are overloaded for all these
types, so that you just call it in error().
Differential Revision: https://reviews.llvm.org/D27030
llvm-svn: 287787
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 286242
|
|
|
|
| |
llvm-svn: 285966
|
|
|
|
|
|
| |
This avoids duplicating the buffer in InputFile.
llvm-svn: 285965
|
|
|
|
|
|
|
|
|
| |
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: 285922
|
|
|
|
| |
llvm-svn: 285904
|
|
|
|
| |
llvm-svn: 285884
|
|
|
|
|
|
| |
This avoids fetching it again from the object.
llvm-svn: 285875
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|