[PATCH] D30458: [ELF] - Make Bss and BssRelRo sections to be synthetic by nature.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 17:08:37 PST 2017


On Tue, Feb 28, 2017 at 5:04 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
>
> > ruiu added a comment.
> >
> > It doesn't seem like an improvement to me. Out::Bss and Out::BssRelRo
> are containers of synthetic sections, thus they are output sections. You
> could represent them as input sections, and we want to do if that
> simplifies code/design, but this patch doesn't seem to simplify it.
>
> They are synthetic sections in the sense that a linker script can
> put them in another output section:
>
>   aabb : { *(.bss.*) }
>
> Maybe we should revisit the idea of having one section per copy
> relocation? We can do that if we add an offset to SharedSymbol or if we
> replace the SharedSymbol with a DefinedRegular when a copy relocation is
> created (I think I like the second option better).
>

Are you saying that, for each symbol that needs copy relocation, create a
.bss (or .bss.rel.ro) synthetic section and add it to the input section
list, so that a latter pass will aggregate them to a .bss (or .bss.rel.ro)
output section?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170228/91cf9c5f/attachment.html>


More information about the llvm-commits mailing list