- Jan 09, 2017
-
-
Rui Ueyama authored
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
-
- Jan 06, 2017
-
-
Rui Ueyama authored
The two overloaded functions hid each other. This patch merges them. llvm-svn: 291222
-
- Nov 25, 2016
-
-
Rui Ueyama authored
llvm-svn: 287945
-
- Nov 23, 2016
-
-
Rui Ueyama authored
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
-
- Nov 10, 2016
-
-
Rafael Espindola authored
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
-
- Nov 09, 2016
-
-
Simon Atanasyan authored
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
-
Simon Atanasyan authored
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
-
- Nov 08, 2016
-
-
Rafael Espindola authored
llvm-svn: 286242
-
- Nov 03, 2016
-
-
Rafael Espindola authored
llvm-svn: 285966
-
Rafael Espindola authored
This avoids duplicating the buffer in InputFile. llvm-svn: 285965
-
Rafael Espindola authored
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
-
Rafael Espindola authored
llvm-svn: 285926
-
Rafael Espindola authored
llvm-svn: 285922
-
Rafael Espindola authored
llvm-svn: 285904
-
George Rimar authored
llvm-svn: 285884
-
Rafael Espindola authored
This avoids fetching it again from the object. llvm-svn: 285875
-
- Nov 02, 2016
-
-
Rui Ueyama authored
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
-
- Nov 01, 2016
-
-
Rafael Espindola authored
llvm-svn: 285755
-
Rafael Espindola authored
This patch replaces GAlloc<ELFT>::<sometype>.Allocate() with alloc<sometype<ELFT>>(). Patch by Rui! llvm-svn: 285748
-
Eugene Leviant authored
Differential revision: https://reviews.llvm.org/D26070 llvm-svn: 285680
-
- 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
-
-
Rui Ueyama authored
llvm-svn: 285347
-
Rafael Espindola authored
Now that it is easy to create input section and symbols, this is simple. llvm-svn: 285322
-
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
-
- Oct 26, 2016
-
-
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
-
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
-
- Oct 21, 2016
-
-
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
-
- 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
-
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
-
- Oct 12, 2016
-
-
Davide Italiano authored
This fixes PR30665. Differential Revision: https://reviews.llvm.org/D25495 llvm-svn: 284034
-
- Oct 10, 2016
-
-
Peter Smith authored
.ARM.exidx sections have a reverse dependency on the section they have a SHF_LINK_ORDER dependency on. In other words a .ARM.exidx section is live only if the executable section it describes is live. We implement this with a reverse dependency field in InputSection. Adding the dependency to InputSection is the simplest implementation but it could be moved out to a separate map if it were found to decrease performance for non ARM targets. Differential revision: https://reviews.llvm.org/D25234 llvm-svn: 283734
-
- Oct 04, 2016
-
-
George Rimar authored
Relative to PR30540. If .symtab has invalid type in elf, no bodies are created and any relocation that tries to access them will fail. The same can happen if symbol index is just incorrect. This was revealed by "id_000005,sig_11,src_000000,op_flip2,pos_420" Differential revision: https://reviews.llvm.org/D25025 llvm-svn: 283201
-
- Sep 29, 2016
-
-
Davide Italiano authored
Differential Revision: https://reviews.llvm.org/D24492 llvm-svn: 282656
-
- Sep 14, 2016
-
-
Rui Ueyama authored
Previously, all input files were owned by the symbol table. Files were created at various places, such as the Driver, the lazy symbols, or the bitcode compiler, and the ownership of new files was transferred to the symbol table using std::unique_ptr. All input files were then free'd when the symbol table is freed which is on program exit. I think we don't have to transfer ownership just to free all instance at once on exit. In this patch, all instances are automatically collected to a vector and freed on exit. In this way, we no longer have to use std::unique_ptr. Differential Revision: https://reviews.llvm.org/D24493 llvm-svn: 281425
-
- 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
-
- Aug 12, 2016
-
-
Simon Atanasyan authored
This section supersedes .reginfo and .MIPS.options sections. But for now we have to support all three sections for ABI transition period. llvm-svn: 278482
-
- 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 15, 2016
-
-
Rui Ueyama authored
llvm-svn: 275608
-