[PATCH] D14140: [ELF2] SECTIONS command basic support

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 12:20:41 PDT 2015


2015/10/29 8:31 "Denis Protivensky" <dprotivensky at accesssoftek.com>:
>
> denis-protivensky added inline comments.
>
> ================
> Comment at: ELF/Writer.cpp:614
> @@ -574,3 +613,3 @@
>
> -  std::stable_sort(OutputSections.begin(), OutputSections.end(),
> -                   compareOutputSections<ELFT>);
> +  std::stable_sort(
> +      OutputSections.begin(), OutputSections.end(),
> ----------------
> ruiu wrote:
> > denis-protivensky wrote:
> > > ruiu wrote:
> > > > I don't like to add more code to createSections() which is already
too long. Move this lambda out of this function.
> > > I need `RegularSections`, which is local to the method. It's captured
in the lambda, and I think it would be ugly to pass it to the comparison
function along with two output sections to compare. Any ideas how to make
it better?
> > Why do you need RegularSections in the first place? What is this
!RegularSections.(A)||!RegularSections.count(B) condition for?
> The intent is to sort 'specific' sections like .symtab, .strtab and
others with default sorting order even if some of these names are defined
in linker script. Can't figure out why the tests pass without this check as
I thought I specifically checked that case. Will look at this more.

I don't think we need that protection. If users try to reorder such
sections, we should do that as instructed, no?

>
>
> http://reviews.llvm.org/D14140
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/9fbd3690/attachment.html>


More information about the llvm-commits mailing list