| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
The isShared case was handled by the isInCurrentDSO check.
llvm-svn: 313190
|
|
|
|
| |
llvm-svn: 313188
|
|
|
|
|
|
|
| |
This reduces the size of SharedSymbol which in turn reduces the size
of Symbol from 88 to 80 bytes.
llvm-svn: 313154
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
It is not needed since it is always 0.
llvm-svn: 313076
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 310736
|
|
|
|
|
|
|
|
|
|
|
|
| |
Liveness is usually a notion of input sections, but this patch adds
"liveness" bit to common symbols because they don't belong to any
input section.
This patch is based on https://reviews.llvm.org/D36520
Differential Revision: https://reviews.llvm.org/D36546
llvm-svn: 310617
|
|
|
|
|
|
|
|
| |
This is probably a small optimization, but the main motivation is
having a way of fixing pr34053 that doesn't require a hash lookup in
isPreempitible.
llvm-svn: 310602
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this Symbol has the same size as before, but DefinedRegular goes
from 72 to 64 bytes.
I also find this a bit easier to read. There are fewer places
initializing File for example.
This has a small but measurable speed improvement on all tests (1%
max).
llvm-svn: 310142
|
|
|
|
| |
llvm-svn: 310079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
executable with --unresolved-symbols=ignore-all"
With fix for undefined weak symbols in executable.
Original commit message:
This is PR32112. Previously when we linked executable with
--unresolved-symbols=ignore-all and undefined symbols, like:
_start:
callq und@PLT
we did not create relocations, though it looks in that case
we should delegate handling of such symbols to runtime linker,
hence should emit them. Patch fixes that.
Differential revision: https://reviews.llvm.org/D35724
llvm-svn: 309796
|
|
|
|
|
|
|
|
| |
Before we were doing it with --export-dynamic. That seems incorrect.
The intention of --export-dynamic is to export symbols *defined* in
the executable.
llvm-svn: 309605
|
|
|
|
|
|
|
|
|
| |
--unresolved-symbols=ignore-all"
It broke bot:
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/4231
llvm-svn: 309258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--unresolved-symbols=ignore-all
This is PR32112. Previously when we linked executable with
--unresolved-symbols=ignore-all and undefined symbols, like:
_start:
callq und@PLT
we did not create relocations, though it looks in that case
we should delegate handling of such symbols to runtime linker,
hence should emit them. Patch fixes that.
Differential revision: https://reviews.llvm.org/D35724
llvm-svn: 309252
|
|
|
|
|
|
|
| |
Rename it because it was too easy to conflict with llvm::object::ObjectFile
which broke buildbots several times.
llvm-svn: 309199
|
|
|
|
|
|
|
|
|
|
|
| |
PT_TLS is a type of program header, so we wouldn't expect to see
one in an object file. This error should probably be referring to
the fact that we didn't see a section with the flag SHF_TLS, which
would normally cause us to create a PT_TLS program header.
Differential Revision: https://reviews.llvm.org/D35395
llvm-svn: 307983
|
|
|
|
|
|
|
|
|
| |
This is a semantic revert of r306036.
We have to change the names, otherwise dynamic relocations will point
to the wrong name.
llvm-svn: 307110
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is PR28414.
Previously LLD was unable to link following:
(failed with undefined symbol bar)
Version script:
SOME_VERSION { global: *; };
.global _start
.global bar
.symver _start, bar@@SOME_VERSION
_start:
jmp bar
Manual has next description:
.symver name, name2@@nodename
In this case, the symbol name must exist and be defined within the file being assembled. It is similar to name2@nodename.
The difference is name2@@nodename will also be used to resolve references to name2 by the linker
https://sourceware.org/binutils/docs/as/Symver.html
Patch implements that. If we have name@@ver symbol and name is undefined, name@@ver is used to resolve references to name.
If name is defined then multiple definition error is emited, that is consistent with what bfd do.
Differential revision: https://reviews.llvm.org/D33680
llvm-svn: 307077
|
|
|
|
|
|
|
|
| |
We could have add this function either Symbol or SymbolBody. I added it
to Symbol at first. But I noticed that if I've added it to SymbolBody,
we could've removed SymbolBody::setName(). So I'll do that in this patch.
llvm-svn: 306590
|
|
|
|
|
|
|
| |
This patch adds a utility function to Symbol. This function should
be useful in https://reviews.llvm.org/D33680 too.
llvm-svn: 306587
|
|
|
|
|
|
|
|
| |
Most "reserved" symbols are in ElfSym and it looks like there's no
reason to not do the same thing for _GLOBAL_OFFSET_TABLE_. This should
help https://reviews.llvm.org/D34618 too.
llvm-svn: 306292
|
|
|
|
| |
llvm-svn: 305112
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before InputSectionBase had an OutputSection pointer, but that was not
always valid. For example, if it was a merge section one actually had
to look at MergeSec->OutSec.
This was brittle and caused bugs like the one fixed by r304260.
We now have a single Parent pointer that points to an OutputSection
for InputSection, but to a SyntheticSection for merge sections and
.eh_frame. This makes it impossible to accidentally access an invalid
OutSec.
llvm-svn: 304338
|
|
|
|
| |
llvm-svn: 302846
|
|
|
|
|
|
| |
This is a bit hackish, but allows for a lot of followup cleanups.
llvm-svn: 302845
|
|
|
|
| |
llvm-svn: 302155
|
|
|
|
| |
llvm-svn: 301278
|
|
|
|
|
|
|
| |
If we knew that we'd add End2, Edata2 and Etext2, we'd name their
original symbols with "1". This patch does it.
llvm-svn: 300263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU linkers define __bss_start symbol.
Patch teaches LLD to do that. This is PR32051.
Below is part of standart ld.bfd script:
.data1 : { *(.data1) }
_edata = .; PROVIDE (edata = .);
. = .;
__bss_start = .;
.bss :
{
Currently LLD can emit up to 3 .bss* sections as one of testcase shows.
Implementation inserts this symbol before first .bss* output section.
Differential revision: https://reviews.llvm.org/D30419
llvm-svn: 299528
|
|
|
|
| |
llvm-svn: 298091
|
|
|
|
| |
llvm-svn: 298071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Was fixed, details on review page.
Original commit message:
That removes CopyRelSection class completely, making
Bss/BssRelRo to be just regular synthetics.
This is splitted from D30541 and polished.
Difference from D30541 that all logic of SharedSymbol
converting to DefinedRegular was removed for now and
probably will be posted as separate patch.
Differential revision: https://reviews.llvm.org/D30892
llvm-svn: 298062
|
|
|
|
|
|
|
|
|
| |
SymbolBody::getGotPltOffset(). NFC.
That opens road to detemplate PltSection<ELFT>,
what allows then to detemplate all methods of SymbolBody.
llvm-svn: 297950
|
|
|
|
| |
llvm-svn: 297943
|
|
|
|
|
|
|
|
|
| |
I suppose it is the reason of BB fail:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/921
https://bugs.llvm.org/show_bug.cgi?id=32167
llvm-svn: 297933
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That removes CopyRelSection class completely, making
Bss/BssRelRo to be just regular synthetics.
This is splitted from D30541 and polished.
Difference from D30541 that all logic of SharedSymbol
converting to DefinedRegular was removed for now and
probably will be posted as separate patch.
Differential revision: https://reviews.llvm.org/D30892
llvm-svn: 297814
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this we have a single section hierarchy. It is a bit less code,
but the main advantage will be in a future patch being able to handle
foo = symbol_in_obj;
in a linker script. Currently that fails since we try to find the
output section of symbol_in_obj. With this we should be able to just
return an InputSection from the expression.
llvm-svn: 297313
|
|
|
|
| |
llvm-svn: 297305
|
|
|
|
|
|
|
| |
This reverts commit r297008 because it's reported that that
change broke AArch64 bots.
llvm-svn: 297297
|
|
|
|
| |
llvm-svn: 297293
|
|
|
|
| |
llvm-svn: 297292
|
|
|
|
| |
llvm-svn: 297286
|
|
|
|
| |
llvm-svn: 297282
|
|
|
|
|
|
|
|
| |
tools/lld/ELF/Symbols.cpp:215:13: error: unused variable 'S'
[-Werror,-Wunused-variable]
if (auto *S = dyn_cast<SharedSymbol>(this)
llvm-svn: 297063
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In compare with D30458, this makes Bss/BssRelRo to be pure
synthetic sections.
That removes CopyRelSection class completely, making
Bss/BssRelRo to be just regular synthetics.
SharedSymbols involved in creating copy relocations are
converted to DefinedRegular, what also simplifies things.
Differential revision: https://reviews.llvm.org/D30541
llvm-svn: 297008
|
|
|
|
|
|
|
| |
Thanks to Rafael for helping to dig down into what we're really trying
to communicate here.
llvm-svn: 296580
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30348
llvm-svn: 296508
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are many special cases and a layer of abstraction or two in the
way, but the VA calculation in the typical case is actually very simple
and probably makes perfect sense even to somebody new to linkers.
Also, this line brings together many components and is a good place to
start understanding the linker (or improve one's existing
understanding).
llvm-svn: 296451
|