Displaying 9 results from an estimated 9 matches for "finalizesect".
2017 Jan 04
5
RFC: LLD range extension thunks
...ller and callee. This could mean
assigning section addresses multiple times.
2.) The alterations to the core data structures to permit more than
one Thunk per symbol and the logic to select the "right" Thunk for
each relocation.
The design I'd like to aim at moves thunk creation into
finalizeSections() at a point where the sizes and addresses of all the
SyntheticSections are known. This would mean that the final address of
each caller and callee could be used, and after thunk creation there
would be no further content changes. This would mean:
- All code that runs prior to thunk creation ma...
2017 Jul 11
2
[LLD] Linker Relaxation
Hi,
Does lld support linker relaxation that may shrink code size? As far
as I see lld seems to assume that the content of input sections to be
fixed other than patching up relocations, but I believe some targets
may benefit the extra optimization opportunity with relaxation.
Specifically, I'm currently working on adding support for RISC-V in
lld, and RISC-V heavily relies on linker relaxation
2017 Jan 05
2
RFC: LLD range extension thunks
...dresses multiple times.
>> 2.) The alterations to the core data structures to permit more than
>> one Thunk per symbol and the logic to select the "right" Thunk for
>> each relocation.
>>
>> The design I'd like to aim at moves thunk creation into
>> finalizeSections() at a point where the sizes and addresses of all the
>> SyntheticSections are known. This would mean that the final address of
>> each caller and callee could be used, and after thunk creation there
>> would be no further content changes. This would mean:
>> - All code...
2017 Jul 11
8
[LLD] Linker Relaxation
...make a
> suggestion.
>
> I'm assuming that if you are doing some kind of range based relaxation
> you'll need something like range extension thunks (I'm working on
> these right now) this means you'll probably have to do your
> calculations on what you can relax in finalizeSections() at a similar
> point to createThunks(), or perhaps the mechanisms would need to be
> merged as I think they'll need to converge on a point when no more
> relaxations are possible and no more thunks can be added.
>
> Writing out the relaxed sections will be interesting as yo...
2018 Aug 21
7
[lld] avoid emitting PLT entries for ifuncs
...C && !isAbsoluteValue(Sym))
Expr = Target->adjustRelaxExpr(Type, RelocatedAddr, Expr);
diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp
index 90462ecc7..418133ebd 100644
--- a/ELF/Writer.cpp
+++ b/ELF/Writer.cpp
@@ -1570,8 +1570,11 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
applySynthetic({InX::EhFrame},
[](SyntheticSection *SS) { SS->finalizeContents(); });
- for (Symbol *S : Symtab->getSymbols())
+ for (Symbol *S : Symtab->getSymbols()) {
S->IsPreemptible |= computeIsPreemptible(*S);
+ if (S->isGnuIFunc() &...
2019 Dec 05
2
GC for defsym'd symbols in LLD
...t;find(s));
The issue can be demonstrated by the following call tree:
LinkerDriver::link
markLive
...
resolveReloc
// Defined::section is nullptr for `d` because the assignment d=foo
hasn't been evaluated yet.
writeResult
Writer<ELFT>::run
Writer<ELFT>::finalizeSections
LinkerScript::processSymbolAssignments
// Symbol section+offset are evaluated here.
It seems that github issues may be a good place to record the problem. I
just created https://github.com/llvm/llvm-project/issues/52
I wanted to mark it low priority, but there is no such labe...
2017 Jul 11
4
[LLD] Linker Relaxation
...;>> I'm assuming that if you are doing some kind of range based relaxation
>>> you'll need something like range extension thunks (I'm working on
>>> these right now) this means you'll probably have to do your
>>> calculations on what you can relax in finalizeSections() at a similar
>>> point to createThunks(), or perhaps the mechanisms would need to be
>>> merged as I think they'll need to converge on a point when no more
>>> relaxations are possible and no more thunks can be added.
>>>
>>> Writing out the re...
2017 Apr 04
2
[LLD] RFC Range Thunks Implementation review for ARM and Mips
...h have a branch instruction
that has a limited range
- On ARM and AArch64 the static linker is expected to insert range extension
thunks when some classes of branch instruction are out of range
Where are we now with LLD and thunks
- We have moved the createThunks() function as late as it can be in
finalizeSections(), most importantly after all the content has been
added to the image.
- We only call createThunks() once and we don't calculate addresses
before createThunks().
- If an OutputSection is described by a LinkerScript then any thunks
created in it are put at the end of the OutputSection. This...
2019 Dec 04
2
GC for defsym'd symbols in LLD
On Wed, 4 Dec 2019 at 07:05, Fāng-ruì Sòng <maskray at google.com> wrote:
>
> On Tue, Dec 3, 2019 at 7:02 PM Shoaib Meenai via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > LLD treats any symbol referenced from a linker script as a GC root, which makes sense. Unfortunately, it also processes --defsym as a linker script fragment internally, so all target