[PATCH] D38613: [ELF] - Change how we deal with unused synthetic sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 7 06:47:04 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D38613#891337, @davide wrote:

> I'm not sure how I feel about this.
>  It's true that reduces the number of lines to implement part of this feature.
>  OTOH, it scatters details that were in a single place into multiple (three, to be precise).
>  In some sense,it makes following this code harder to read.


I understand your concerns.

It was suggested in https://reviews.llvm.org/D38393 thread to design something
different than `removeUnusedSynteticSections`. 
Also there was also discussion about behavior of this function in https://reviews.llvm.org/D37520 thread.

Designing something different anyways requires touching code outside of this method it seems.
We normally rely on Live flag when trying to control whether input or output section be in output.
In this patch I am just trying to be consistent with the rest LLD code.

I have no better ideas how to rework it at this moment. Initially I posted https://reviews.llvm.org/D37520
to fix silly issue we have currently. We could probably just land it for now.


https://reviews.llvm.org/D38613





More information about the llvm-commits mailing list