- Feb 14, 2017
-
-
Rui Ueyama authored
These files contain a lexer, so the new names are better. The parser is in LinkerScript.{cpp,h}. llvm-svn: 295022
-
- Feb 10, 2017
-
-
Eric Fiselier authored
LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects to correctly link the threading library when needed. Unfortunately `PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed and therefore can't be used when configuring out-of-tree builds. This causes such builds to fail since `pthread` isn't being correctly linked. This patch attempts to fix that problem by renaming and exporting `LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB` because It seemed likely to cause collisions with downstream users of `LLVMConfig.cmake`. llvm-svn: 294690
-
- Jan 13, 2017
-
-
Rafael Espindola authored
The format is not exactly the same as the one in bfd since bfd always follows a linker script and prints it along. llvm-svn: 291958
-
- Dec 18, 2016
-
-
Rui Ueyama authored
I thought for a while about how to remove it, but it looks like we can just copy the file for now. Of course I'm not happy about that, but it's just less than 50 lines of code, and we already have duplicate code in Error.h and some other places. I want to solve them all at once later. Differential Revision: https://reviews.llvm.org/D27819 llvm-svn: 290062
-
- Dec 12, 2016
-
-
Saleem Abdulrasool authored
Enable building lld as a standalone project. This is motivated by the desire to package lld for inclusion in a linux distribution. This allows building lld against an existing paired llvm installation. Now that lld is usable on x86_64, it makes sense to revive this configuration to allow distributions to package it. llvm-svn: 289421
-
- Dec 08, 2016
-
-
Rui Ueyama authored
llvm-svn: 289084
-
- Nov 20, 2016
-
-
Rui Ueyama authored
We have a .cpp and a .h for parseDynamicList(). This patch moves the function to DriverUtil.cpp. llvm-svn: 287468
-
- Nov 17, 2016
-
-
Chris Bieneman authored
This patch updates a couple places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287205
-
- Nov 01, 2016
-
-
Rui Ueyama authored
We are going to have many more classes for linker-synthesized input sections, so it's worth to be added to a separate file than to the file for regular input sections. llvm-svn: 285740
-
- Oct 28, 2016
-
-
Rui Ueyama authored
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
-
- Oct 27, 2016
-
-
Rafael Espindola authored
Now that it is easy to create input section and symbols, this is simple. llvm-svn: 285322
-
- Oct 21, 2016
-
-
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
-
- Oct 20, 2016
-
-
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
-
- Sep 10, 2016
-
-
Michael J. Spencer authored
Implemented by building an ELF file in memory. elf, default, and binary match gold behavior. Differential Revision: https://reviews.llvm.org/D24060 llvm-svn: 281108
-
- Sep 06, 2016
-
-
Rafael Espindola authored
llvm-svn: 280753
-
- Aug 08, 2016
-
-
Rui Ueyama authored
Previously, we incrementally updated the reuslting flag as we check file flags, so it was not very clear who is updating what flags. This patch makes them pure functions -- that has no side effect and don't update arguments to improve readability. Now each function construct a patial result, and all resutls are then bitwise-OR'ed to construct the final result. This patch also creates a new file, Mips.cpp, to move all these MIPS functions to a separate file. Differential Revision: https://reviews.llvm.org/D23249 llvm-svn: 278042
-
- Jul 26, 2016
-
-
Peter Collingbourne authored
This flag is implemented similarly to --reproduce in the ELF linker. This patch implements /linkrepro by moving the cpio writer and associated utility functions to lldCore, and using that implementation in both linkers. One COFF-specific detail is that we store the object file from which the resource files were created in our reproducer, rather than the resource files themselves. This allows the reproducer to be used on non-Windows systems for example. Differential Revision: https://reviews.llvm.org/D22418 llvm-svn: 276719
-
- Jul 08, 2016
-
-
Peter Smith authored
The TinyPtrVector of const Thunk<ELFT>* in InputSections.h can cause build failures on certain compiler/library combinations when Thunk<ELFT> is not a complete type or is an abstract class. Fixed by making Thunk<ELFT> non Abstract. type or is an abstract class llvm-svn: 274863
-
Peter Smith authored
This seems to be causing a buildbot failure on lld-x86_64-freebsd. Will reproduce locally and fix. llvm-svn: 274841
-
Peter Smith authored
Generalise the Mips LA25 Thunk code and implement ARM and Thumb interworking Thunks. - Introduce a new module Thunks.cpp to store the Target Specific Thunk implementations. - DefinedRegular and Shared have a ThunkData field to record Thunk. - A Target can have more than one type of Thunk. - Support PC-relative calls to Thunks. - Support Thunks to PLT entries. - Existing Mips LA25 Thunk code integrated. - Support for ARMv7A interworking Thunks. Limitations: - Only one Thunk per SymbolBody, this is sufficient for all currently implemented Thunks. - ARM thunks assume presence of V6T2 MOVT and MOVW instructions. Differential revision: http://reviews.llvm.org/D21891 llvm-svn: 274836
-
- Jun 29, 2016
-
-
Rui Ueyama authored
llvm-svn: 274109
-
- Jun 22, 2016
-
-
Davide Italiano authored
This fixes PR28218. Thanks to Rafael for spotting a failure in the SHARED_LIBS build! Differential Revision: http://reviews.llvm.org/D21577 llvm-svn: 273451
-
- May 24, 2016
-
-
Rui Ueyama authored
scanReloc and the functions on which scanReloc depends is in total more than 600 lines of code. Since scanReloc does not depend on Writer, it is better to move it into a separate file. Differential Revision: http://reviews.llvm.org/D20554 llvm-svn: 270606
-
Rui Ueyama authored
llvm-svn: 270526
-
- May 15, 2016
-
-
Davide Italiano authored
Differential Revision: http://reviews.llvm.org/D20267 llvm-svn: 269605
-
- Apr 22, 2016
-
-
Peter Collingbourne authored
This patch only implements support for version scripts of the form: { [ global: symbol1; symbol2; [...]; symbolN; ] local: *; }; No wildcards are supported, other than for the local entry. Symbol versioning is also not supported. It works by introducing a new Symbol flag which tracks whether a symbol appears in the global section of a version script. This patch also simplifies the logic in SymbolBody::isPreemptible(), and teaches it to handle the case where symbols with default visibility in DSOs do not appear in the dynamic symbol table because of a version script. Fixes PR27482. Differential Revision: http://reviews.llvm.org/D19430 llvm-svn: 267208
-
- Apr 18, 2016
-
-
Rafael Espindola authored
llvm-svn: 266655
-
- Apr 17, 2016
-
-
Ismail Donmez authored
llvm-svn: 266558
-
- Apr 13, 2016
-
-
Adhemerval Zanella authored
This patch implements the --dynamic-list option, which adds a list of global symbol that either should not be bounded by default definition when creating shared libraries, or add in dynamic symbol table in the case of creating executables. The patch modifies the ScriptParserBase class to use a list of Token instead of StringRef, which contains information if the token is a quoted or unquoted strings. It is used to use a faster search for exact match symbol name. The input file follow a similar format of linker script with some simplifications (it does not have scope or node names). It leads to a simplified parser define in DynamicList.{cpp,h}. Different from ld/gold neither glob pattern nor mangled names (extern 'C++') are currently supported. llvm-svn: 266227
-
- Apr 06, 2016
-
-
Adhemerval Zanella authored
This patch add a base script tokenizer class to decouple parsing from linker script handling. The idea is to use this base class on dynamic list parsing (--dynamic-list option). No functionality added. llvm-svn: 265600
-
- Mar 30, 2016
-
-
Ismail Donmez authored
llvm-svn: 264844
-
- Mar 22, 2016
-
-
Rui Ueyama authored
The code for LTO has been growing, so now is probably a good time to move it to its own file. SymbolTable.cpp is for symbol table, and because compiling bitcode files are semantically not a part of symbol table, this is I think a good thing to do. http://reviews.llvm.org/D18370 llvm-svn: 264091
-
- Mar 18, 2016
-
-
Rafael Espindola authored
Tested with a shared build. llvm-svn: 263800
-
Jan Vesely authored
Fixes SHARED_LIB build broken by r263761 llvm-svn: 263796
-
- Mar 11, 2016
-
-
Ismail Donmez authored
llvm-svn: 263213
-
- Mar 09, 2016
-
-
Jan Vesely authored
Fixes build broken by r263055. llvm-svn: 263064
-
- Mar 01, 2016
-
-
Rafael Espindola authored
llvm-svn: 262345
-
- Feb 28, 2016
-
-
Rui Ueyama authored
UniversalDriver was used as a dispatcher to each platform-specific driver. It had its own Options.td file. It was not just too much to parse only a few options (we only want to parse -core, -flavor or argv[0]), but also interpreted arguments too early. For example, if you invoke lld as "lld -flavor gnu ... -help", then you'd get the UniversalDriver's help message instead of GnuDriver's. This patch eliminates the use of Options from the dispatcher. http://reviews.llvm.org/D17686 llvm-svn: 262190
-
Rafael Espindola authored
llvm-svn: 262159
-
- Feb 25, 2016
-
-
Rui Ueyama authored
This patch implements the same algorithm as LLD/COFF's ICF. I'm not going to repeat the same description about how it works, so you want to read the comment in ICF.cpp in this patch if you want to know the details. This algorithm should be more powerful than the ICF algorithm implemented in GNU gold. It can even merge mutually-recursive functions (which is harder than one might think). ICF is a fairly effective size optimization. Here are some examples. LLD: 37.14 MB -> 35.80 MB (-3.6%) Clang: 59.41 MB -> 57.80 MB (-2.7%) The lacking feature is "safe" version of ICF. This merges all identical sections. That is not compatible with a C/C++ language requirement that two distinct functions must have distinct addresses. But as long as your program do not rely on the pointer equality (which is in many cases true), your program should work with the feature. LLD works fine for example. GNU gold implements so-called "safe ICF" that identifies functions that are safe to merge by heuristics -- for example, gold thinks that constructors are safe to merge because there is no way to take an address of a constructor in C++. We have a different idea which David Majnemer suggested that we add NOPs at beginning of merged functions so that two or more pointers can have distinct values. We can do whichever we want, but this patch does not include neither. http://reviews.llvm.org/D17529 llvm-svn: 261912
-