- Oct 27, 2016
-
-
Rafael Espindola authored
This allows us to set a value for it based on -m. llvm-svn: 285294
-
Rafael Espindola authored
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
-
Peter Smith authored
When static linking in ARM (like Mips) __tls_get_addr is defined by the library so we should not define it as a synthetic. We also need to add __exidx_start and __exidx_end for the .ARM.exidx section as the static libc library startup code is expecting them to be defined by the default linker script for static linking on ARM. Differential revision: https://reviews.llvm.org/D25978 llvm-svn: 285279
-
- Oct 26, 2016
-
-
Rafael Espindola authored
Another step in making it easier to create symbols without an ELf_Sym. llvm-svn: 285241
-
Rui Ueyama authored
llvm-svn: 285240
-
Rafael Espindola authored
All the global ones now just forward to the same constructor. This makes it easier to construct them without creating a Elf_Sym. llvm-svn: 285238
-
Rui Ueyama authored
llvm-svn: 285236
-
Rui Ueyama authored
llvm-svn: 285235
-
Rafael Espindola authored
As the state of lld gets more complicated, shutting down gets more expensive. In a normal lld run we can just call _exit immediately after renaming the temporary output file. We still want the ability to run a full shutdown since that is useful for detecting memory leaks. This patch adds a --full-shutdown flag and changes lit to use it. llvm-svn: 285224
-
Rafael Espindola authored
This allows a non template class to hold input sections. llvm-svn: 285221
-
Rui Ueyama authored
llvm-svn: 285220
-
Rui Ueyama authored
llvm-svn: 285219
-
Rafael Espindola authored
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
-
Rafael Espindola authored
llvm-svn: 285190
-
Eugene Leviant authored
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
-
Rui Ueyama authored
llvm-svn: 285169
-
Rui Ueyama authored
llvm-svn: 285164
-
Rui Ueyama authored
This is in sync with what clang does. llvm-svn: 285163
-
Rafael Espindola authored
llvm-svn: 285149
-
Rafael Espindola authored
Instead of storing a pointer, store the members we need. The reason for doing this is that it makes it far easier to create synthetic sections. It also avoids reading data from files multiple times., which might help with cross endian linking and host architectures with slow unaligned access. There are obvious compacting opportunities, but this already has mixed results even on native x86_64 linking. There is also the possibility of better refactoring the code for handling common symbols, but this already shows that a custom class is not necessary. llvm-svn: 285148
-
- Oct 25, 2016
-
-
Eugene Zelenko authored
Differential revision: https://reviews.llvm.org/D25931 llvm-svn: 285086
-
Rafael Espindola authored
llvm-svn: 285082
-
Rafael Espindola authored
We were fairly inconsistent as to what information should be accessed with getSectionHdr and what information (like alignment) was stored elsewhere. Now all section info has a dedicated getter. The code is also a bit more compact. llvm-svn: 285079
-
Rafael Espindola authored
llvm-svn: 285062
-
- Oct 24, 2016
-
-
Peter Collingbourne authored
We were previously using the (static) addSynthetic function to create *_start/*_end symbols. This function was doing almost the same thing as addOptionalSynthetic, except that it would also create the symbol in the case where it is unreferenced. Because the symbol has hidden visibility, creating it in that case would have no effect other than adding another entry to the static symbol table. Remove addSynthetic and change callers to use addOptionalSynthetic instead. Differential Revision: https://reviews.llvm.org/D25545 llvm-svn: 285021
-
Pavel Labath authored
llvm-svn: 284965
-
- Oct 21, 2016
-
-
Rafael Espindola authored
llvm-svn: 284878
-
Rafael Espindola authored
We were already using it in the larger sets/maps. This provides about 1% speedup in linking xul and chromium. llvm-svn: 284862
-
Rui Ueyama authored
llvm-svn: 284846
-
Peter Smith authored
When doing a relocatable link the .ARM.exidx sections with the SHF_LINK_ORDER flag set need to set the sh_link field to the executable section they describe. We find the appropriate OutputSection by following the sh_link field of the .ARM.exidx InputSections. The getOutputSectionName() function rules make sure that when there are multiple .ARM.exidx InputSections in an OutputSection they all have the same sh_link field. Differential revision: https://reviews.llvm.org/D25825 llvm-svn: 284820
-
George Rimar authored
rL284708 introduces a link error when building with BUILD_SHARED_LIBS: undefined reference to `llvm::DWARFContext::parseCompileUnits()' undefined reference to `llvm::DWARFContextInMemory::DWARFContextInMemory( llvm::object::ObjectFile const&, llvm::LoadedObjectInfo const*)' The functions are available in libDebugInfoDWARF, from llvm. Patch by Visoiu Mistrih Francis Differential revision: https://reviews.llvm.org/D25843 llvm-svn: 284810
-
Simon Atanasyan authored
Some MIPS relocations used to access GOT entries are able to manipulate 16-bit index. The other ones like R_MIPS_CALL_HI16/LO16 can handle 32-bit indexes. 16-bit relocations are generated by default. The 32-bit relocations are generated by -mxgot flag passed to compiler. Usually these relocation are not mixed in the same code but files like crt*.o contain 16-bit relocations so even if all "user's" code compiled with -mxgot flag a few 16-bit relocations might come to the linking phase. Now LLD does not differentiate local GOT entries accessed via a 16-bit and 32-bit indexes. That might lead to relocation's overflow if 16-bit entries are allocated to far from the beginning of the GOT. The patch introduces new "part" of MIPS GOT dedicated to the local GOT entries accessed by 32-bit relocations. That allows to put local GOT entries accessed via a 16-bit index first and escape relocation's overflow. Differential revision: https://reviews.llvm.org/D25833 llvm-svn: 284809
-
Rui Ueyama authored
llvm-svn: 284806
-
Rui Ueyama authored
llvm-svn: 284805
-
Rui Ueyama authored
llvm-svn: 284804
-
Rui Ueyama authored
In-memory ELF object files created here are consumed immediately, so as long as the generated files are syntactically correct, we don't care about the details. llvm-svn: 284803
-
Rui Ueyama authored
llvm-svn: 284790
-
- Oct 20, 2016
-
-
Rui Ueyama authored
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
-
Rui Ueyama authored
llvm-svn: 284776
-
Reid Kleckner authored
Summary: The rules for quoting the command line that a subprocess receives are user space conventions implemented by the C runtime. Python's quoting rules are implemented here: https://github.com/python/cpython/blob/c30098c8c6014f3340a369a31df9c74bdbacc269/Lib/subprocess.py#L725 The result is that the final command line C string computed by Python is 'echo \"'. Mingw doesn't appear to interpret that backslash as escaping the quote because it is not already inside a quoted region. As a result, our echo command prints a single backslash instead of a quote. The whole issue can be sidestepped by adding a space a forcing Python to put the argument to echo in double quotes. Reviewers: inglorion, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25841 llvm-svn: 284768
-