| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can move all not templated functionality to LinkerScriptBase.
Patch do that for hasPhdrsCommands() and shows how it helps to detemplate
things in other places.
Probably we should be able to merge these 2 classes into single one after such steps.
Even if not, it still looks as reasonable cleanup for me.
Differential revision: https://reviews.llvm.org/D30895
llvm-svn: 297714
|
|
|
|
|
|
|
|
|
| |
lld crashes when .eh_frame or .eh_frame_hdr section is discarded
in linker script and there is no PHDRS directive.
Differential revision: https://reviews.llvm.org/D30885
llvm-svn: 297712
|
|
|
|
|
|
|
|
|
| |
Fix a bug introduced in r297313 which caused them to resolve to the end
of the ELF header in PIEs and DSOs.
Differential Revision: https://reviews.llvm.org/D30843
llvm-svn: 297638
|
|
|
|
| |
llvm-svn: 297622
|
|
|
|
|
|
|
|
|
|
|
| |
Using .eh_frame input section pattern in linker script currently
causes a crash; this is because .eh_frame input sections require
special handling since they're all combined into a synthetic
section rather than regular output section.
Differential Revision: https://reviews.llvm.org/D30627
llvm-svn: 297501
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
.eh_frame_hdr is a header constructed for .eh_frame sections.
We do not proccess .eh_frame when doing relocatable output,
so should not try to create .eh_frame_hdr too.
Previous behavior without this patch is segfault.
Fixes PR32118.
Differential revision: https://reviews.llvm.org/D30566
llvm-svn: 297365
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 297286
|
|
|
|
| |
llvm-svn: 297282
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the calls to finalizeContent() for each synthetic section
before createThunks(). This will allow us to assign addresses prior to
calling createThunks(). As addition of thunks may add to the static
symbol table and may affect the size of the mips got section we introduce a
couple of additional member functions to update these values.
Differential revision: https://reviews.llvm.org/D29983
llvm-svn: 297277
|
|
|
|
|
|
| |
It now matches the name used in InputSectionBase.
llvm-svn: 297144
|
|
|
|
| |
llvm-svn: 297108
|
|
|
|
| |
llvm-svn: 297077
|
|
|
|
| |
llvm-svn: 297061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many places we reset Size to 0 before calling assignOffsets()
manually. Sometimes we don't do that.
It looks we can just always do that inside.
Previous code had:
template <class ELFT> void OutputSection::assignOffsets() {
uint64_t Off = Size;
And tests feels fine with Off = 0.
I think Off = Size make no sence.
Differential revision: https://reviews.llvm.org/D30463
llvm-svn: 296609
|
|
|
|
| |
llvm-svn: 296511
|
|
|
|
|
|
| |
We converted them before, but there were a few remaining occurrences.
llvm-svn: 296510
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30348
llvm-svn: 296508
|
|
|
|
|
|
| |
We do not use it later, so don't have to store.
llvm-svn: 296466
|
|
|
|
|
|
|
|
| |
Previously, these two functions put their symbols in different queues.
Now that the queues have been merged. So there's no point to keep two
separate functions.
llvm-svn: 296435
|
|
|
|
|
|
|
| |
In LLD source code, too many functions are called "finalize", although
what they do are different. This patch gives it a better name.
llvm-svn: 296314
|
|
|
|
|
|
| |
This class didn't use ELFT.
llvm-svn: 296313
|
|
|
|
| |
llvm-svn: 296311
|
|
|
|
|
|
|
|
|
|
| |
The list of all input sections was defined in SymbolTable class for a
historical reason. The list itself is not a template. However, because
SymbolTable class is a template, we needed to pass around ELFT to access
the list. This patch moves the list out of the class so that it doesn't
need ELFT.
llvm-svn: 296309
|
|
|
|
|
|
|
| |
Since OutputSection is no longer a template, it doesn't make much
sense to tempalte its factory class.
llvm-svn: 296308
|
|
|
|
| |
llvm-svn: 296307
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D30351
llvm-svn: 296303
|
|
|
|
| |
llvm-svn: 296225
|
|
|
|
|
|
|
| |
Now that all special sections are SyntheticSections, we only need one
OutputSection class.
llvm-svn: 296127
|
|
|
|
| |
llvm-svn: 296123
|
|
|
|
|
|
|
|
|
|
|
| |
__ehdr_start should be pointing to ELF file headers, not program
headers.
This is a reland of D30319.
Differential Revision: https://reviews.llvm.org/D30323
llvm-svn: 296085
|
|
|
|
|
|
| |
This reverts commit r296079.
llvm-svn: 296083
|
|
|
|
|
|
|
|
|
| |
__ehdr_start should be pointing to ELF file headers, not program
headers.
Differential Revision: https://reviews.llvm.org/D30319
llvm-svn: 296079
|
|
|
|
|
|
|
|
| |
With this we complete the transition out of special output sections,
and with the previous patches it should be possible to merge
OutputSectionBase and OuputSection.
llvm-svn: 296023
|
|
|
|
|
|
|
|
|
| |
With the current design an InputSection is basically anything that
goes directly in a OutputSection. That includes plain input section
but also synthetic sections, so this should probably not be a
template.
llvm-svn: 295993
|
|
|
|
|
|
|
| |
If -z stack-size is given, we need to add PT_GNU_STACK even if
-z execstack is not given.
llvm-svn: 295945
|
|
|
|
|
|
|
| |
Now that InputSectionBase is not a template there is no reason to have
the two.
llvm-svn: 295924
|
|
|
|
|
|
|
| |
Removing this template is not a big win by itself, but opens the way
for removing more templates.
llvm-svn: 295923
|
|
|
|
| |
llvm-svn: 295909
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the SymbolBodies with isLocal() == true before the global
symbols then calculating NumLocals rather than assuming all locals are
added before globals and the first NumLocals have isLocal() == true. This
permits Thunks to be moved after the pass that adds global symbols from
synthetics to the symbol table.
Differential revision: https://reviews.llvm.org/D30085
llvm-svn: 295650
|
|
|
|
|
|
|
|
| |
This is a small difference I noticed to gold and bfd. When given
--print-gc-sections, we print sections a linkerscript marks
DISCARD. The other linkers don't.
llvm-svn: 295467
|
|
|
|
| |
llvm-svn: 295448
|
|
|
|
| |
llvm-svn: 295388
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this we would produce two relocation sections pointing to the
same section, which gnu tools reject.
This fixes pr31986.
The implementation of -r/--emit-reloc is getting fairly
complicated. But lets get the test passing before trying to refactor
it.
llvm-svn: 295385
|
|
|
|
|
|
|
| |
We can do this now that the linker script and the writer agree on
which sections should be combined.
llvm-svn: 295341
|
|
|
|
| |
llvm-svn: 295283
|
|
|
|
| |
llvm-svn: 295280
|