[lld] r277105 - [ELF] Allow arbitrary code alignment in .eh_frame

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 06:37:56 PDT 2016


Could you add a testcase? In the review you mentioned that gas uses it
for aarch64. Should MC be changed to use it too? If not, can you check
in a binary?

Thanks,
Rafael


On 29 July 2016 at 00:41, Petr Hosek via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: phosek
> Date: Thu Jul 28 23:41:38 2016
> New Revision: 277105
>
> URL: http://llvm.org/viewvc/llvm-project?rev=277105&view=rev
> Log:
> [ELF] Allow arbitrary code alignment in .eh_frame
>
> According to the specification, CIE code alignment factor is an
> arbitrary unsigned LEB128 encoded value.
>
> Differential revision: https://reviews.llvm.org/D22954
>
> Modified:
>     lld/trunk/ELF/EhFrame.cpp
>
> Modified: lld/trunk/ELF/EhFrame.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/EhFrame.cpp?rev=277105&r1=277104&r2=277105&view=diff
> ==============================================================================
> --- lld/trunk/ELF/EhFrame.cpp (original)
> +++ lld/trunk/ELF/EhFrame.cpp Thu Jul 28 23:41:38 2016
> @@ -117,9 +117,8 @@ template <class ELFT> uint8_t getFdeEnco
>    StringRef Aug(reinterpret_cast<const char *>(D.begin()), AugEnd - D.begin());
>    D = D.slice(Aug.size() + 1);
>
> -  // Code alignment factor should always be 1 for .eh_frame.
> -  if (readByte(D) != 1)
> -    fatal("CIE code alignment must be 1");
> +  // Skip code alignment factor.
> +  skipLeb128(D);
>
>    // Skip data alignment factor.
>    skipLeb128(D);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list