[PATCH] D39959: [ELF] - Allow merging of strings sections for -relocatable output.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 09:00:49 PST 2017


James Henderson via Phabricator <reviews at reviews.llvm.org> writes:

> jhenderson added a comment.
>
> Given that the issue with not combining sections was purely restricted to .debug_str, which only ever has an entsize of 1, would it not make more sense to not combine the InputSections for different entsize values?
>
> I'm wary about removing the SHF_MERGE flag, because I'm pretty sure mergeable sections of different sizes are not that rare, although they do not typically have the same name, so maybe it's okay.

I agree. We should merge SHF_MERGE sections in pretty much the same way
we do for regular (non -r) output. We then just assign each
MergeSyntheticSection to its own OutputSection and keep the SHF_MERGE
flag.

Cheers,
Rafael


More information about the llvm-commits mailing list