[PATCH] D23768: [ELF] Linkerscript: eliminate LayoutInputSection

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 07:01:21 PDT 2016

I'm doing so, because I have to filter out duplicate input sections in
createInputSectionList() function. Otherwise GoesAfter field may
point to non-existent input section object. The simplest case when we can
have duplicate input sections is:

.foo :  {

See linkerscript-input-sec-dup.s for a test case

2016-08-30 16:53 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:

> On 30 August 2016 at 09:10, Eugene Leviant <evgeny.leviant at gmail.com>
> wrote:
> > evgeny777 added a comment.
> >
> > Yeah. See lines 294-295 in LinkerScript.cpp. Also, please take a look at
> linkerscript-symbols-synthetic.s
> Yes, I missed that the lambda was updating the outer Off variable.
> This is definitely an improvement. I guess my only remaining question
> is why do you need to set OutSec to -1?
> I think it might be possible to simplify things further by assigning
> offsets earlier, but that can be an independent patch.
> Cheers,
> Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160830/0cea266e/attachment.html>

More information about the llvm-commits mailing list