This is the mail archive of the
mailing list for the binutils project.
Re: [gold] Merging string literals with bigger alignment
On Tue, Feb 12, 2013 at 6:22 AM, Alexander Ivchenko <firstname.lastname@example.org> wrote:
> 2013/2/8 Ian Lance Taylor <email@example.com>:
>> If the requested alignment of the section is, say, 32, that implies
>> that the first entry of the section must be aligned on a 32-byte
>> boundary. There must be some reason that the compiler is asking for
>> that alignment. The merge code in gold does not preserve the
>> alignment. Simply discarding the check means that we are ignoring the
>> compiler's requested alignment. That doesn't sound like a good idea
>> to me.
> Seems that we have to add the alignment preservation in the merge
> code. Or am I missing something?
I don't think you are missing anything. That is why I wrote the
comment "This could be handled, but it's unusual." Although
apparently it is not unusual.
>> Testing on x86 proves nothing as x86 has no alignment requirements.
>> Why does icc request a larger alignment for a mergeable string
>> section? What does it want to have happen?
> I'm not really sure about the exact reason of that. But we have an
> issue with GCC as well, because string literals produced by GCC with
> alignment 4 still are not merged now..
Can you show us a smal source code example that will cause GCC to
produce such a section? Thanks.