[PATCH] D32289: [ELF] - Linkerscript: support combination of linkerscript and --compress-debug-sections.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 14:11:42 PDT 2017


On Mon, May 1, 2017 at 2:08 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> George Rimar via Phabricator <reviews at reviews.llvm.org> writes:
> > Index: ELF/OutputSections.cpp
> > ===================================================================
> > --- ELF/OutputSections.cpp
> > +++ ELF/OutputSections.cpp
> > @@ -93,6 +93,10 @@
> >        !Name.startswith(".debug_"))
> >      return;
> >
> > +  // We call maybeCompress() early and for linkerscript case need to
> assign offsets,
> > +  // because that was not done yet. That finalizes mergeable synthetic
> sections.
> > +  assignOffsets();
> > +
>
> It seems wrong to this in here.
>

That is probably true.


> In the most general case (like for thunks), we will have to run
> assignAddresses multiple times.
>
> For debug info it should be trivial to change processCommands to compute
> the offsets.
>
> BTW, should we avoid compressing or error out if the linker script has a
> symbol assignment? For example:
>
> SECTIONS {
> .debug_str : { *(foo) sym=.; *(bar) }
> }
>

Is this a hypothetical use case, or do you actually have something like
this?


>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170501/4f94264a/attachment.html>


More information about the llvm-commits mailing list