summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Relocations.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLD][ELF] - Report a location for symbols from the linker script when ↵George Rimar2018-12-191-2/+15
| | | | | | | | | | | | | | | | | | | reporting an error. When we report an error for symbols defined in the linker script, we do not report the location properly. For example: ld.lld: error: relocation R_AARCH64_CALL26 cannot refer to absolute symbol: aliasto__text >>> defined in <internal> >>> referenced by rtoabs.o:(.text+0x4) This patch fixes that. Differential revision: https://reviews.llvm.org/D55360 llvm-svn: 349612
* Simplify Symbol::getPltVA.Rui Ueyama2018-11-281-1/+1
| | | | | | | | | | | This patch also makes getPltEntryOffset a non-member function because it doesn't depend on any private members of the TargetInfo class. I tried a few different ideas, and it seems this change fits in best to me. Differential Revision: https://reviews.llvm.org/D54981 llvm-svn: 347781
* [ELF] - Fix R_AARCH64_ADR_GOT_PAGE, R_AARCH64_LD64_GOT_LO12 handling against ↵George Rimar2018-11-271-4/+16
| | | | | | | | | | | | | | | | | | | | IFUNC symbols. This is https://bugs.llvm.org/show_bug.cgi?id=38074. The issue is that when calling a function, LLD generates a .got entry that points to the IFUNC resolver function when instead, it should use the PLT entries properly for handling the IFUNC. So we should create a got entry that points to PLT entry, which itself loads the value from .got.plt, relocated with R_*_IRELATIVE to make things work. Patch do that. Differential revision: https://reviews.llvm.org/D54314 llvm-svn: 347650
* [ELF] - Renamed few more AArch64 specific relocation expressions. NFC.George Rimar2018-11-151-9/+10
| | | | | | They are AArch64 only, so have to have AARCH64_* prefix. llvm-svn: 346963
* [PPC64] Long branch thunks.Sean Fertile2018-11-141-0/+1
| | | | | | | | | | | | | | | | | | On PowerPC64, when a function call offset is too large to encode in a call instruction the address is stored in a table in the data segment. A thunk is used to load the branch target address from the table relative to the TOC-pointer and indirectly branch to the callee. When linking position-dependent code the addresses are stored directly in the table, for position-independent code the table is allocated and filled in at load time by the dynamic linker. For position-independent code the branch targets could have gone in the .got.plt but using the .branch_lt section for both position dependent and position independent binaries keeps it consitent and helps keep this PPC64 specific logic seperated from the target-independent code handling the .got.plt. Differential Revision: https://reviews.llvm.org/D53408 llvm-svn: 346877
* [ELF] - Renamed AArch64 specific relocations expressions. NFC.George Rimar2018-11-131-10/+11
| | | | | | They did not have AArch64 prefix. Now they do. llvm-svn: 346749
* Move a function out of a class because it doesn't depend on any class ↵Rui Ueyama2018-10-231-14/+14
| | | | | | member. NFC. llvm-svn: 345093
* Avoid unnecessary buffer allocation and memcpy for compressed sections.Rui Ueyama2018-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we uncompress all compressed sections before doing anything. That works, and that is conceptually simple, but that could results in a waste of CPU time and memory if uncompressed sections are then discarded or just copied to the output buffer. In particular, if .debug_gnu_pub{names,types} are compressed and if no -gdb-index option is given, we wasted CPU and memory because we uncompress them into newly allocated bufers and then memcpy the buffers to the output buffer. That temporary buffer was redundant. This patch changes how to uncompress sections. Now, compressed sections are uncompressed lazily. To do that, `Data` member of `InputSectionBase` is now hidden from outside, and `data()` accessor automatically expands an compressed buffer if necessary. If no one calls `data()`, then `writeTo()` directly uncompresses compressed data into the output buffer. That eliminates the redundant memory allocation and redundant memcpy. This patch significantly reduces memory consumption (20 GiB max RSS to 15 Gib) for an executable whose .debug_gnu_pub{names,types} are in total 5 GiB in an uncompressed form. Differential Revision: https://reviews.llvm.org/D52917 llvm-svn: 343979
* [ELF][HEXAGON] Add support for GOT relocations.Sid Manning2018-10-041-9/+9
| | | | | | | | | | | | | The GOT is referenced through the symbol _GLOBAL_OFFSET_TABLE_ . The relocation added calculates the offset into the global offset table for the entry of a symbol. In order to get the correct TargetVA I needed to create an new relocation expression, HEXAGON_GOT. It does Sym.getGotVA() - In.GotPlt->getVA(). Differential Revision: https://reviews.llvm.org/D52744 llvm-svn: 343784
* Use std::make_pair rather than brace initialization.Matt Morehouse2018-10-041-2/+2
| | | | | | | r343732 broke the Windows bot. Seems like the compiler on that bot doesn't like brace initialization. llvm-svn: 343749
* Minor refacotring of Relocations.cpp. NFC.Rui Ueyama2018-10-031-44/+67
| | | | | | | | This patch splits ThunkCreator::mergeThunks into two smaller functions. Also adds blank lines to various places so that the code doesn't look too dense. llvm-svn: 343732
* Introduce a flag to warn when ifunc symbols are used with text relocations.Ali Tamur2018-10-021-3/+14
| | | | | | | | | | | | | | | | | Summary: This patch adds a new flag, --warn-ifunc-textrel, to work around a glibc bug. When a code with ifunc symbols is used to produce an object file with text relocations, lld always succeeds. However, if that object file is linked using an old version of glibc, the resultant binary just crashes with segmentation fault when it is run (The bug is going to be corrected as of glibc 2.19). Since there is no way to tell beforehand what library the object file will be linked against in the future, there does not seem to be a fool-proof way for lld to give an error only in cases where the binary will crash. So, with this change (dated 2018-09-25), lld starts to give a warning, contingent on a new command line flag that does not have a gnu counter part. The default value for --warn-ifunc-textrel is false, so lld behaviour will not change unless the user explicitly asks lld to give a warning. Users that link with a glibc library with version 2.19 or newer, or does not use ifunc symbols, or does not generate object files with text relocations do not need to take any action. Other users may consider to start passing warn-ifunc-textrel to lld to get early warnings. Reviewers: ruiu, espindola Reviewed By: ruiu Subscribers: grimar, MaskRay, markj, emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D52430 llvm-svn: 343628
* Reset input section pointers to null on each linker invocation.Rui Ueyama2018-09-251-50/+48
| | | | | | | | | | Previously, if you invoke lld's `main` more than once in the same process, the second invocation could fail or produce a wrong result due to a stale pointer values of the previous run. Differential Revision: https://reviews.llvm.org/D52506 llvm-svn: 343009
* [PPC64] Add TLS initial exec to local exec relaxationZaara Syeda2018-08-211-2/+5
| | | | | | | | | This patch adds the target call back relaxTlsIeToLe to support TLS relaxation from initial exec to local exec model. Differential Revision: https://reviews.llvm.org/D48091 llvm-svn: 340281
* [ELF] Add support for Armv5 and Armv6 compatible ThunksPeter Smith2018-08-201-5/+6
| | | | | | | | | | | | | | | | Older Arm architectures do not support the MOVT and MOVW instructions so we must use an alternative sequence of instructions to transfer control to the destination. Assuming at least Armv5 this patch adds support for Thunks that load or add to the program counter. Note that there are no Armv5 Thumb Thunks as there is no Thumb branch instruction in Armv5 that supports Thunks. These thunks will not work for Armv4t (arm7tdmi) as this architecture cannot change state from using the LDR or ADD instruction. Differential Revision: https://reviews.llvm.org/D50077 llvm-svn: 340160
* [LLD][ELF] - Eliminate dead code from OffsetGetter::get().George Rimar2018-08-141-1/+1
| | | | | | | | | We have a dead piece of code there which is impossible to trigger using regular objects I believe. Patch removes it and adds a test case showing how this condition can be triggered with use of a broken object and crash the linker. llvm-svn: 339680
* [LLD][ELF] - Remove UnresolvedPolicy::IgnoreAll and relative code. NFC.George Rimar2018-08-141-3/+0
| | | | | | | | The code involved was simply dead. `IgnoreAll` value is used in `maybeReportUndefined` only which is never called for -r. And at the same time `IgnoreAll` was set only for -r. llvm-svn: 339672
* [LLD][ELF] - Remove dead code from handleTlsRelocation. NFC.George Rimar2018-08-131-2/+0
| | | | | | | | Code is dead because R_TLSDESC_CALL is already handled in the following block of the code: https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L231 llvm-svn: 339566
* [LLD][ELF] - Remove dead code from handleTlsRelocation. NFC.George Rimar2018-08-131-3/+0
| | | | | | | | | | That piece of code is really very old and "protected" from TLS relocations against symbol in non-allocatable sections. It is useless because normally non-alloc sections have relocations with allocatable targets, but not the reverse. And so the code was simply dead. llvm-svn: 339553
* Support RISC-VRui Ueyama2018-08-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by PkmX. This patch makes lld recognize RISC-V target and implements basic relocation for RV32/RV64 (and RVC). This should be necessary for static linking ELF applications. The ABI documentation for RISC-V can be found at: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md. Note that the documentation is far from complete so we had to figure out some details from bfd. The patch should be pretty straightforward. Some highlights: - A new relocation Expr R_RISCV_PC_INDIRECT is added. This is needed as the low part of a PC-relative relocation is linked to the corresponding high part (auipc), see: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#pc-relative-symbol-addresses - LLVM's MC support for RISC-V is very incomplete (we are working on this), so tests are given in objectyaml format with the original assembly included in the comments. Once we have complete support for RISC-V in MC, we can switch to llvm-as/llvm-objdump. - We don't support linker relaxation for now as it requires greater changes to lld that is beyond the scope of this patch. Once this is accepted we can start to work on adding relaxation to lld. Differential Revision: https://reviews.llvm.org/D39322 llvm-svn: 339364
* [ELF] Don't copy STT_TLS in copy relocationFangrui Song2018-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During copy relocation of a variable defined in a DSO, if a TLS variable in that DSO happens to have the same st_value, it would also be copied. This was unnecessary because the addresses of TLS variables are relative to TLS segment. They don't interfere with non-TLS variables. This copying behavior can be harmful in the following scenario: For function-scope thread-local variables with non-trivial constructors, they have guard variables. In the case of x86_64 general-dynamic model: template <int N> void foo() { thread_local std::string a; } GOT[n] R_X86_64_DTPMOD64 guard variable for a GOT[n+1] R_X86_64_DTPOFF64 guard variable for a GOT[n+2] R_X86_64_DTPMOD64 a GOT[n+3] R_X86_64_DTPOFF64 a a and its guard variable are both represented as TLS variables, which should be within the same module. If one is copy relocated to the main module while the other is not, their module ID will mismatch and can cause access without prior construction. Reviewers: ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D50289 llvm-svn: 339042
* Revert r336609: Fix direct calls to __wrap_sym when it is relocated.Rui Ueyama2018-07-181-1/+1
| | | | | | | This reverts commit r336609 as it doesn't seem to work with AArch64 thunk creation when used with ASan. llvm-svn: 337413
* Fix direct calls to __wrap_sym when it is relocated.Rui Ueyama2018-07-091-1/+1
| | | | | | | | | | | | Patch by Matthew Koontz! Before, direct calls to __wrap_sym would not map to valid PLT entries, so they would crash at runtime. This change maps such calls to the same PLT entry as calls to sym that are then wrapped. Differential Revision: https://reviews.llvm.org/D48502 llvm-svn: 336609
* lld: add experimental support for SHT_RELR sections.Rui Ueyama2018-07-091-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Rahul Chaudhry! This change adds experimental support for SHT_RELR sections, proposed here: https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg Pass '--pack-dyn-relocs=relr' to enable generation of SHT_RELR section and DT_RELR, DT_RELRSZ, and DT_RELRENT dynamic tags. Definitions for the new ELF section type and dynamic array tags, as well as the encoding used in the new section are all under discussion and are subject to change. Use with caution! Pass '--use-android-relr-tags' with '--pack-dyn-relocs=relr' to use SHT_ANDROID_RELR section type instead of SHT_RELR, as well as DT_ANDROID_RELR* dynamic tags instead of DT_RELR*. The generated section contents are identical. '--pack-dyn-relocs=android+relr --use-android-relr-tags' enables both '--pack-dyn-relocs=android' and '--pack-dyn-relocs=relr': lld will encode the relative relocations in a SHT_ANDROID_RELR section, and pack the rest of the dynamic relocations in a SHT_ANDROID_REL(A) section. Differential Revision: https://reviews.llvm.org/D48247 llvm-svn: 336594
* [PPC64] Add TLS local dynamic to local exec relaxationZaara Syeda2018-07-091-8/+13
| | | | | | | | | This patch adds the target call back relaxTlsLdToLe to support TLS relaxation from local dynamic to local exec model. Differential Revision: https://reviews.llvm.org/D48293 llvm-svn: 336559
* [PPC64] Add support for R_PPC64_GOT_DTPREL16* relocationsZaara Syeda2018-06-271-6/+24
| | | | | | | | | | | | | | The local dynamic TLS access on PPC64 ELF v2 ABI uses R_PPC64_GOT_DTPREL16* relocations when a TLS variables falls outside 2 GB of the thread storage block. This patch adds support for these relocations by adding a new RelExpr called R_TLSLD_GOT_OFF which emits a got entry for the TLS variable relative to the dynamic thread pointer using the relocation R_PPC64_DTPREL64. It then evaluates the R_PPC64_GOT_DTPREL16* relocations as the got offset for the R_PPC64_DTPREL64 got entries. Differential Revision: https://reviews.llvm.org/D48484 llvm-svn: 335732
* [ELF] Pass callables by function_refBenjamin Kramer2018-06-161-1/+1
| | | | | | | No need to create a heavyweight std::function if it's not stored. No functionality change intended. llvm-svn: 334885
* [ELF] Fix copy relocation when two symbols share the same Symbol instance.Fangrui Song2018-06-111-4/+5
| | | | | | | | | | In glibc libc.so.6, the multiple versions of sys_errlist share the same Symbol instance. When sys_errlist is copy relocated, we would replace SharedSymbol with Defined in the first iteration of the following loop: for (SharedSymbol *Sym : getSymbolsAt<ELFT>(SS)) Then in the second iteration, we think the symbol (which has been changed to Defined) is still SharedSymbol and screw up (the address ends up in the `Size` field). llvm-svn: 334432
* [ELF][MIPS] Multi-GOT implementationSimon Atanasyan2018-06-111-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all entries inside MIPS GOT are referenced by signed 16-bit index. Zero entry lies approximately in the middle of the GOT. So the total number of GOT entries cannot exceed ~16384 for 32-bit architecture and ~8192 for 64-bit architecture. This limitation makes impossible to link rather large application like for example LLVM+Clang. There are two workaround for this problem. The first one is using the -mxgot compiler's flag. It enables using a 32-bit index to access GOT entries. But each access requires two assembly instructions two load GOT entry index to a register. Another workaround is multi-GOT. This patch implements it. Here is a brief description of multi-GOT for detailed one see the following link https://dmz-portal.mips.com/wiki/MIPS_Multi_GOT. If the sum of local, global and tls entries is less than 64K only single got is enough. Otherwise, multi-got is created. Series of primary and multiple secondary GOTs have the following layout: ``` - Primary GOT Header Local entries Global entries Relocation only entries TLS entries - Secondary GOT Local entries Global entries TLS entries ... ``` All GOT entries required by relocations from a single input file entirely belong to either primary or one of secondary GOTs. To reference GOT entries each GOT has its own _gp value points to the "middle" of the GOT. In the code this value loaded to the register which is used for GOT access. MIPS 32 function's prologue: ``` lui v0,0x0 0: R_MIPS_HI16 _gp_disp addiu v0,v0,0 4: R_MIPS_LO16 _gp_disp ``` MIPS 64 function's prologue: ``` lui at,0x0 14: R_MIPS_GPREL16 main ``` Dynamic linker does not know anything about secondary GOTs and cannot use a regular MIPS mechanism for GOT entries initialization. So we have to use an approach accepted by other architectures and create dynamic relocations R_MIPS_REL32 to initialize global entries (and local in case of PIC code) in secondary GOTs. But ironically MIPS dynamic linker requires GOT entries and correspondingly ordered dynamic symbol table entries to deal with dynamic relocations. To handle this problem relocation-only section in the primary GOT contains entries for all symbols referenced in global parts of secondary GOTs. Although the sum of local and normal global entries of the primary got should be less than 64K, the size of the primary got (including relocation-only entries can be greater than 64K, because parts of the primary got that overflow the 64K limit are used only by the dynamic linker at dynamic link-time and not by 16-bit gp-relative addressing at run-time. The patch affects common LLD code in the following places: - Added new hidden -mips-got-size flag. This flag required to set low maximum size of a single GOT to be able to test the implementation using small test cases. - Added InputFile argument to the getRelocTargetVA function. The same symbol referenced by GOT relocation from different input file might be allocated in different GOT. So result of relocation depends on the file. - Added new ctor to the DynamicReloc class. This constructor records settings of dynamic relocation which used to adjust address of 64kb page lies inside a specific output section. With the patch LLD is able to link all LLVM+Clang+LLD applications and libraries for MIPS 32/64 targets. Differential revision: https://reviews.llvm.org/D31528 llvm-svn: 334390
* Correct aligment computation for shared object symbols.Han Shen2018-06-061-1/+1
| | | | | | | | | | The original computation for shared object symbol alignment is wrong when st_value equals 0. It is very unusual for dso symbols to have st_value equal 0. But when it happens, it causes obscure run time bugs. Differential Revision: https://reviews.llvm.org/D47602 llvm-svn: 334135
* [PPC64] Support R_PPC64_GOT_TLSLD16 relocations.Sean Fertile2018-05-311-1/+1
| | | | | | | | | Add support for the R_PPC64_GOT_TLSLD16 relocations used to build the address of the tls_index struct used in local-dynamic tls. Differential Revision: https://reviews.llvm.org/D47538 llvm-svn: 333681
* Rename R_TLSGD/R_TLSLD to add _GOT_FROM_END. NFC.Sean Fertile2018-05-311-6/+7
| | | | | | | | | getRelocTargetVA for R_TLSGD and R_TLSLD RelExprs calculate an offset from the end of the got, so adjust the names to reflect this. Differential Revision: https://reviews.llvm.org/D47379 llvm-svn: 333674
* [PPC64] Support General-Dynamic tls.Sean Fertile2018-05-291-4/+4
| | | | | | | | | Adds handling of all the relocation types for general-dynamic thread local storage. Differential Revision: https://reviews.llvm.org/D47325 llvm-svn: 333420
* [PPC64] isRelExpr should return true for the PPC Call Exprs.Sean Fertile2018-05-111-1/+2
| | | | | | | | | Both R_PPC_CALL and R_PPC_CALL_PLT Exprs map to the R_PPC64_REL24 relocation which has the form Sym + addend - P. Differential Revision: https://reviews.llvm.org/D46654 llvm-svn: 332127
* [PPC64] Remove support for ELF V1 ABI in LLDZaara Syeda2018-05-041-6/+6
| | | | | | | | | | | The current support for V1 ABI in LLD is incomplete. This patch removes V1 ABI support and changes the default behavior to V2 ABI, issuing an error when using the V1 ABI. It also updates the testcases to V2 and removes any V1 specific tests. Differential Revision: https://reviews.llvm.org/D46316 llvm-svn: 331529
* Add a comment. NFC.Rafael Espindola2018-04-261-0/+5
| | | | llvm-svn: 330967
* Replace SharedSymbols with Defined when creating copy relocations.Rafael Espindola2018-04-261-13/+24
| | | | | | | | | | | | | This is slightly simpler to read IMHO. Now if a symbol has a position in the file, it is Defined. The main motivation is that with this a SharedSymbol doesn't need a section, which reduces the size of SymbolUnion. With this the peak allocation when linking chromium goes from 568.1 to 564.2 MB. llvm-svn: 330966
* Simplify processRelocAux.Rafael Espindola2018-04-261-17/+19
| | | | | | | | | | | It returns a different Expr only in the case of creating a function symbol pointing to its plt entry. We can just add a call to addPltEntry to avoid that and return void. With this patch further simplifications of how we handle copy relocations are possible. llvm-svn: 330960
* Add -z {combreloc,copyreloc,noexecstack,lazy,relro,text}.Rui Ueyama2018-04-201-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D45902 llvm-svn: 330482
* [ELF] - Eliminate Target::isPicRel method.George Rimar2018-04-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | As was mentioned in comments for D45158, isPicRel's name does not make much sense, because what this method does is checks if we need to create the dynamic relocation or not. Instead of renaming it to something different, we can 'isPicRel' completely. We can reuse the getDynRel method. They are logically very close, getDynRel can just return R_*_NONE in case no dynamic relocation should be produced and that would simplify things and avoid functionality correlation/duplication with 'isPicRel'. The patch does this change. Differential revision: https://reviews.llvm.org/D45248 llvm-svn: 329275
* ELF: Try to create last thunk section at ThunkSectionSpacing bytes before ↵Peter Collingbourne2018-03-301-3/+18
| | | | | | | | | | | | | | | | | | | | | | the end. Now that we have the ability to create short thunks, it is beneficial for thunk sections to be surrounded by ThunkSectionSpacing bytes of code on both sides in order to increase the likelihood that the distance from the thunk to the target will be sufficiently small to allow for the creation of a short thunk. This is currently the case for most thunks that we create, except for the last one, which could, depending on the size of the output section, potentially appear near the end and therefore have a relatively small amount of code after it. This patch moves the last thunk section to ThunkSectionSpacing bytes before the end of the output section, as long as the section is larger than 2*ThunkSectionSpacing bytes. It reduces the size of Chromium for Android's .text section by 32KB. Differential Revision: https://reviews.llvm.org/D44966 llvm-svn: 328889
* ELF: Allow thunks to change size. NFCI.Peter Collingbourne2018-03-291-4/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D44962 llvm-svn: 328841
* Add a SectionBase::getVA helper. NFC.Rafael Espindola2018-03-241-1/+1
| | | | | | There were a few too many places duplicating this. llvm-svn: 328402
* Update Error MessageRumeet Dhindsa2018-03-141-1/+2
| | | | | | | | | | | | | | Summary: Updates error message for dynamic relocation attempt for read only segments. Reviewers: ruiu Reviewed By: ruiu Subscribers: emaste, javed.absar, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D44453 llvm-svn: 327584
* Error instead of producing broken binary.Rafael Espindola2018-03-141-0/+11
| | | | | | | | This "fixes" PR36678 by just producing an error when we find a case where we would produce an plt entry that used ebx but ebx would not be set. llvm-svn: 327542
* ELF: Do not create multiple thunks for the same virtual address.Peter Collingbourne2018-03-091-9/+14
| | | | | | | | | | This avoids creating multiple thunks for symbols with aliases or which belong to ICF'd sections. This patch reduces the size of Chromium for Android by 260KB (0.8% of .text). Differential Revision: https://reviews.llvm.org/D44284 llvm-svn: 327154
* Merge {COFF,ELF}/Strings.cpp to Common/Strings.cpp.Rui Ueyama2018-02-281-1/+1
| | | | | | | | | This should resolve the issue that lld build fails in some hosts that uses case-insensitive file system. Differential Revision: https://reviews.llvm.org/D43788 llvm-svn: 326339
* [ELF] Add comment for preemptible and fix typo. NFCFangrui Song2018-02-231-1/+1
| | | | | | | | Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D43642 llvm-svn: 325855
* Consistent (non) use of empty lines in include blocksSam Clegg2018-02-201-1/+0
| | | | | | | | | The profailing style in lld seem to be to not include such empty lines. Clang-tidy/clang-format seem to handle this just fine. Differential Revision: https://reviews.llvm.org/D43528 llvm-svn: 325629
* Simplify RelocationBaseSection::addReloc.Rafael Espindola2018-02-161-6/+6
| | | | | | | | Now that we have R_ADDEND, UseSymVA was redundant. We only want to write the symbol virtual address when using an expression other than R_ADDEND. llvm-svn: 325360
OpenPOWER on IntegriCloud