- Oct 26, 2016
-
-
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
-
-
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
-
- 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
-
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
-
Konstantin Zhuravlyov authored
This is needed for the following case (OpenCL example): __global int Var = 0; __global int* Ptr[] = {&Var}; ... Differential Revision: https://reviews.llvm.org/D25815 llvm-svn: 284764
-
Rui Ueyama authored
llvm-svn: 284758
-
Simon Atanasyan authored
llvm-svn: 284751
-
Simon Atanasyan authored
[ELF][MIPS] Separate calculation of MIPS GOT index and offset of the corresponding part of the GOT. NFC MIPS GOT consists of some parts: local, global, TLS entries. This change separates calculation of MIPS GOT index and offset of the corresponding part of the GOT. That makes code a bit clear and allow to extend number of parts in the future. llvm-svn: 284750
-
Hans Wennborg authored
Builds were failing with: InputSection.h(139): error C2338: SectionPiece is too big because MSVC does record layout differently, probably not packing the 'OutputOff' and 'Live' bitfields because their types are of different size. Using size_t for 'Live' seems to fix it. llvm-svn: 284740
-
Benjamin Kramer authored
llvm-svn: 284739
-
Rafael Espindola authored
We allocate a lot of these when linking debug info. This speeds up the link of debug programs by 1% to 2%. llvm-svn: 284716
-
Peter Smith authored
The R_ARM_PREL31 and R_ARM_NONE relocations should not be faulted in shared libraries. In the case of R_ARM_NONE, we have moved the TLS relaxation hint instruction to R_TLSDESC_CALL so that R_HINT can be used without side-effects. In the case of R_ARM_PREL31 we permit it to be used against PLT entries as the personality routines are imported when used in shared libraries. Differential Revision: https://reviews.llvm.org/D25721 llvm-svn: 284710
-
Eugene Leviant authored
This script below shouldn't include file and program headers to PT_LOAD segment, because it doesn't have PHDRS and FILEHDR attributes: PHDRS { all PT_LOAD; } SECTIONS { /* list of sections here */ } Differential revision: https://reviews.llvm.org/D25774 llvm-svn: 284709
-
George Rimar authored
In this patch partial gdb_index section is created. For costructing the .gdb_index section 6 steps should be performed (details are in SplitDebugInfo.cpp file header), this patch do first 3: Creates proper section header. Fills list of compilation units. Types CU list area is not supposed to be supported, so it is ignored and therefore can be treated as implemented either. Differential revision: https://reviews.llvm.org/D24706 llvm-svn: 284708
-
George Rimar authored
llvm-svn: 284705
-
Rui Ueyama authored
Also replace std::copy with memcpy because in other places we are using memcpy. llvm-svn: 284700
-
Rui Ueyama authored
llvm-svn: 284699
-
Rui Ueyama authored
llvm-svn: 284697
-
Rui Ueyama authored
This member is used only by LinkerDriver, so move it to LinkerDriver. llvm-svn: 284696
-
Rui Ueyama authored
llvm-svn: 284695
-
Rui Ueyama authored
llvm-svn: 284694
-
Rui Ueyama authored
-format=<foo>, -format <foo> and -b <foo> are all the same. Previous code was intended to produce an error message with the same spelling as given from the command line, but it actually always printed out this string: "unknown -format= value:". This is probably more confusing than "unknown -format value:". So I changed the message. llvm-svn: 284693
-
Rui Ueyama authored
llvm-svn: 284692
-
Rui Ueyama authored
llvm-svn: 284687
-