[PATCH] D39697: Limit the maximum alignment of copyrel'ed shared symbols to 32.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 15:33:51 PST 2017


It is harder to create a testcase for this than I thought. When I specify
an output section alignment using a linker script, both GNU linkers create
huge executable so that the output section is aligned even on disk. I don't
know how to work around it. I could edit an so file using binary editor and
check in that binary, but I don't know if it's worth to do.


On Mon, Nov 6, 2017 at 3:18 PM, Rui Ueyama <ruiu at google.com> wrote:

> Actually I can't. yaml2obj can't serialize/deserialize .so files, and you
> can't use lld to generate a .so containing a section whose alignment is
> greater than 2^32. Looks like I need to check in a binary generated by
> ld.gold.
>
> On Mon, Nov 6, 2017 at 2:43 PM, Rui Ueyama <ruiu at google.com> wrote:
>
>> I can. I filed a bug as https://bugs.llvm.org/show_bug.cgi?id=35218
>>
>> On Mon, Nov 6, 2017 at 2:37 PM, Rafael Avila de Espindola <
>> rafael.espindola at gmail.com> wrote:
>>
>>> Rui Ueyama <ruiu at google.com> writes:
>>>
>>> > It is funny that llvm-mc fails with an assertion failure when your
>>> assembly
>>> > contains ".align 0x100000000" because it assumes internally that
>>> alignments
>>> > is less than 2^32. I need to fix it first.
>>>
>>> Can you use yaml2obj for the testcase?
>>>
>>> Cheers,
>>> Rafael
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171106/d115350b/attachment.html>


More information about the llvm-commits mailing list