<div dir="ltr"><div>It is already non-trivial to write assembly portable on x86-32 and x86-64</div><div><br></div><div>.section .eh_frame,"a",@progbits # 32<br></div>.section .eh_frame,"a",@unwind # 64<div><br></div><div>Writing .eh_frame manually does not seem very correct.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 3:59 PM Joerg Sonnenberger <<a href="mailto:joerg@bec.de">joerg@bec.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Feb 21, 2020 at 03:46:55PM -0800, Fangrui Song via llvm-commits wrote:<br>
> <br>
> Author: Fangrui Song<br>
> Date: 2020-02-21T15:44:14-08:00<br>
> New Revision: 75af9da755721123e62b45cd0bc0c5e688a9722a<br>
> <br>
> URL: <a href="https://github.com/llvm/llvm-project/commit/75af9da755721123e62b45cd0bc0c5e688a9722a" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/75af9da755721123e62b45cd0bc0c5e688a9722a</a><br>
> DIFF: <a href="https://github.com/llvm/llvm-project/commit/75af9da755721123e62b45cd0bc0c5e688a9722a.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/75af9da755721123e62b45cd0bc0c5e688a9722a.diff</a><br>
> <br>
> LOG: [MC][ELF] Error for sh_type, sh_flags or sh_entsize change<br>
> <br>
> Heads-up message: <a href="https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html" rel="noreferrer" target="_blank">https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html</a><br>
> <br>
> GNU as started to emit warnings for changed sh_type or sh_flags in 2000.<br>
> GNU as>=2.35 will emit errors for most sh_type/sh_flags change, and error for entsize change.<br>
> <br>
> Some cases remain warnings for legacy reasons:<br>
> <br>
>    .section .init_array,"ax", @progbits<br>
>    .section .init_array,"ax", @init_array<br>
>    # And some obscure sh_flags changes (OS/Processor specific flags)<br>
<br>
This is highly annoying as e.g. 32bit and 64bit x86 are different now in<br>
the flags required for .eh_frame.<br>
<br>
Joerg<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">宋方睿</div></div>