Displaying 3 results from an estimated 3 matches for "an_expression_with_to".
2019 Dec 04
2
GC for defsym'd symbols in LLD
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 symbols of a --defsym also get treated as GC roots (i.e., if you have something like --defsym SRC=TGT, TGT will become a GC root). I believe this to be unnecessary for defsym specifically, since you're just
2019 Dec 04
2
GC for defsym'd symbols in LLD
...xt_bar is retained
> % ld.bfd a.o --defsym d=1 --gc-sections -o a => Neither .text_foo nor
> .text_bar is retained
> % ld.bfd a.o --defsym c=foo --defsym d=1 --gc-sections -o a => Neither
> .text_foo nor .text_bar is retained; lld will retain .text_foo.
>
> For --defsym from=an_expression_with_to, GNU ld appears to add a
> reference from 'from' to 'to'. lld's behavior
> (https://reviews.llvm.org/D34195) is more conservative.
>
> If we stop treating script->referencedSymbols as GC roots,
> instructions like `movabs $d, %rax` will no longer be able to acc...
2019 Dec 05
2
GC for defsym'd symbols in LLD
...--gc-sections -o a => Neither .text_foo nor
> > .text_bar is retained
> > % ld.bfd a.o --defsym c=foo --defsym d=1 --gc-sections -o a =>
> Neither
> > .text_foo nor .text_bar is retained; lld will retain .text_foo.
> >
> > For --defsym from=an_expression_with_to, GNU ld appears to add a
> > reference from 'from' to 'to'. lld's behavior
> > (
> https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D34195&d=DwIFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=MpiPCWMhZJFZg0s-e1l...