- Sep 15, 2017
-
-
Rafael Espindola authored
This fixes pr34301. As the bug points out, we want to keep some relocations with undefined weak symbols. This means that we cannot always claim that these symbols are not preemptible as we do now. Unfortunately, we cannot also just always claim that they are preemptible. Doing so would, for example, cause us to try to create a plt entry when we don't even have a dynamic symbol table. What almost works is to say that weak undefined symbols are preemptible if and only if we have a dynamic symbol table. Almost because we don't want to fail the build trying to create a copy relocation to a weak undefined. llvm-svn: 313372
-
George Rimar authored
Patch removes one of OutputSectionFactory::addInputSec methods. That allows to simplify reporting of discarded sections and should help to D37561. Differential revision: https://reviews.llvm.org/D37735 llvm-svn: 313361
-
Rafael Espindola authored
_gp points to a position in the file, so it is not really absolute. It is also simpler to not force it to be absolute, so if there is no strong ABI requirement we should not do it. llvm-svn: 313333
-
- Sep 13, 2017
-
-
Rafael Espindola authored
The isShared case was handled by the isInCurrentDSO check. llvm-svn: 313190
-
Rafael Espindola authored
llvm-svn: 313188
-
Rafael Espindola authored
llvm-svn: 313184
-
Rafael Espindola authored
This reduces the size of SharedSymbol which in turn reduces the size of Symbol from 88 to 80 bytes. llvm-svn: 313154
-
George Rimar authored
There is no need to scan over all input sections for relocatable output. As we do not process or scan relocations anyways. Patch moves check for Config->Relocatable out to avoid that and also removes excessive check for isa<EhInputSection> from first for loop. It is excessive because we handle all of them in a second for loop below. That all allowed to simplify code. Differential revision: https://reviews.llvm.org/D37746 llvm-svn: 313127
-
Rafael Espindola authored
This should fix the lto bootstrap. It is somewhat hard to remember about lazy symbols deep down in the link. It might be worth it replacing them with undefined symbols once we are done adding files. llvm-svn: 313103
-
Rui Ueyama authored
llvm-svn: 313095
-
Ben Dunbobbin authored
https://reviews.llvm.org/rL312796 meant that references to garbage collected common symbols would cause a segfault. This change fixes the behaviour for references to stripped common symbols. Differential Revision: https://reviews.llvm.org/D37718 llvm-svn: 313086
-
- Sep 12, 2017
-
-
Rafael Espindola authored
It is not needed since it is always 0. llvm-svn: 313076
-
Rafael Espindola authored
llvm-svn: 313051
-
Rafael Espindola authored
Given our representation of symbols as section + offset, we can finalize symbols like _end as soon as the section is known. llvm-svn: 313048
-
Simon Atanasyan authored
The patch implements initial support of microMIPS code linking: - Handle microMIPS specific relocations. - Emit both R1-R5 and R6 microMIPS PLT records. For now linking mixed set of regular and microMIPS object files is not supported. Also the patch does not handle (setup and clear) the least-significant bit of an address which is utilized as the ISA mode bit and allows to make jump between regular and microMIPS code without any thunks. Differential revision: https://reviews.llvm.org/D37335 llvm-svn: 313028
-
Peter Smith authored
Replace OutputSection *Cmd to OutputSection *OS. The Commands vector was moved to OutputSection but the names of the variables were not. This patch changes the names to match. Differential Revision: https://reviews.llvm.org/D37627 llvm-svn: 313015
-
Rafael Espindola authored
This fixes two more cases where we were aligning the offset in a section, instead of the final address. llvm-svn: 312983
-
Rafael Espindola authored
When given foobar = ALIGN(., 0x100); my expectation from what the manual says is that the final address of foobar will be aligned. It seems that bfd aligns the offset in the section, which causes some odd results if the section is not 0x100 aligned. Gold aligns the address. This changes lld to align the final address. llvm-svn: 312979
-
- Sep 11, 2017
-
-
Martell Malone authored
When building COFF programs many targets such as mingw prefer to have a gnu ld frontend. Rather then having a fully fledged standalone driver we wrap a shim around the LINK driver. Extra tests were provided by mstorsjo Reviewers: mstorsjo, ruiu Differential Revision: https://reviews.llvm.org/D33880 llvm-svn: 312926
-
- Sep 08, 2017
-
-
Rui Ueyama authored
llvm-svn: 312823
-
Rafael Espindola authored
llvm-svn: 312820
-
Rafael Espindola authored
llvm-svn: 312812
-
Rafael Espindola authored
We handled all undefined symbols before this. llvm-svn: 312808
-
Rafael Espindola authored
llvm-svn: 312807
-
Rafael Espindola authored
This allows combining --dynamic-list and version scripts too. The version script controls which symbols are visible, and --dynamic-list controls which of those are preemptible. Unlike previous versions, undefined symbols are still considered preemptible, which was the issue breaking the cfi tests. This fixes pr34053. llvm-svn: 312806
-
Dmitry Mikulin authored
to separate commons based on file name patterns. The following linker script construct does not work because commons are allocated before section placement is done and the only synthesized BssSection that holds all commons has no file associated with it: SECTIONS { .common_0 : { *file0.o(COMMON) }} This patch changes the allocation of commons to create a section per common symbol and let the section logic do the layout. Differential revision: https://reviews.llvm.org/D37489 llvm-svn: 312796
-
George Rimar authored
llvm-svn: 312789
-
George Rimar authored
llvm-svn: 312787
-
George Rimar authored
REGION_ALIAS(alias, region) Alias names can be added to existing memory regions created with the MEMORY command. Each name corresponds to at most one memory region. Differential revision: https://reviews.llvm.org/D37477 llvm-svn: 312777
-
Rafael Espindola authored
This reverts commit r312757. Evgenii Stepanov reports that it broke some tests. llvm-svn: 312771
-
Rafael Espindola authored
If --dynamic-list is given, only those symbols are preemptible. This allows combining --dynamic-list and version scripts too. The version script controls which symbols are visible, and --dynamic-list controls which of those are preemptible. This fixes pr34053. llvm-svn: 312757
-
Rui Ueyama authored
llvm-svn: 312753
-
- Sep 07, 2017
-
-
Peter Smith authored
To support errata patching on AArch64 we need to be able to overwrite an arbitrary instruction with a branch. For AArch64 it is sufficient to always write all the bits of the branch instruction and not just the immediate field. This is safe as the non-immediate bits of the branch instruction are always the same. Differential Revision: https://reviews.llvm.org/D36745 llvm-svn: 312727
-
George Rimar authored
As was suggested in D34956 thread. llvm-svn: 312712
-
George Rimar authored
It is a bit more convinent and helps to simplify logic of program headers allocation a little. Differential revision: https://reviews.llvm.org/D34956 llvm-svn: 312711
-
Andrew Ng authored
The default padding for an executable segment is the target trap instruction which for x86_64 is 0xCC. However, the .eh_frame section requires the padding to be zero. The code that writes the .eh_frame section assumes that its segment is zero initialized and does not explicitly write the zero padding. This does not work when the .eh_frame section is in the executable segment (for example when using -no-rosegment). This patch changes the .eh_frame writing code to explicitly write the zero padding. Differential Revision: https://reviews.llvm.org/D37462 llvm-svn: 312706
-
James Henderson authored
If using --format=binary with an input file name that has one or more non-ascii characters in, LLD has undefined behaviour (it crashes on my Windows Debug build) when calling isalnum with these non-ascii characters. Instead, of calling std::isalnum, this patch uses an internal version that ignores the locale and checks a specific subset of characters. Reviewers: ruiu Differential Revision: https://reviews.llvm.org/D37331 llvm-svn: 312705
-
Rafael Espindola authored
llvm-svn: 312675
-
- Sep 06, 2017
-
-
Davide Italiano authored
llvm-svn: 312669
-
Rui Ueyama authored
Differential Revision: https://reviews.llvm.org/D37524 llvm-svn: 312656
-