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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 13:48:23 PST 2018


Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

> I feel like we should stop using `Live` bit for output sections. Input sections need that flag because they are gc'ed, but for output sections, we shouldn't create useless output sections in the first place. I feel like the current output sections have too many states and that makes writing code harder.

It is hard to know upfront it an output section will be useless or not.

We have to create them when we first parse the linker script, and we
only know that they are useless once no orphan is assigned to them.

It might be possible to just remove them instead of using the Live
bit. That would be an interesting experiment.

Cheers,
Rafael


More information about the llvm-commits mailing list