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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 01:55:33 PST 2017


Yes, that's the case I saw. I expect the same is true for char*_t as well.
And of course, who knows what people wrote in their hand-written/generated
assembly?

On 14 November 2017 at 08:43, Rui Ueyama <ruiu at google.com> wrote:

> I believe it can. I can imagine that wchar_t string constants could result
> in a SHF_MERGE section with entry size of 4.
>
> On Tue, Nov 14, 2017 at 5:39 PM, George Rimar <grimar at accesssoftek.com>
> wrote:
>
>> >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.
>>
>> Out of curiosity, do you mean mergeable *string* sections of different
>> sizes are not that rare ? Because my patch drops the
>> SHF_MERGE flag only for SHF_STRING sections. And I was wondering if
>> SHF_STRING sections
>> may have entsize > 1 in reality.
>>
>> George.
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/7cb38fd5/attachment.html>


More information about the llvm-commits mailing list