From 17052ba37922f94a0a5029096442c442275b19bb Mon Sep 17 00:00:00 2001 From: emaste Date: Wed, 15 Feb 2017 15:18:43 +0000 Subject: MFC r313458: lld: Allow arbitrary code alignment in .eh_frame According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value. PR: 216908 --- contrib/llvm/tools/lld/ELF/EhFrame.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'contrib/llvm/tools/lld/ELF/EhFrame.cpp') diff --git a/contrib/llvm/tools/lld/ELF/EhFrame.cpp b/contrib/llvm/tools/lld/ELF/EhFrame.cpp index b130ac1..1f3d928 100644 --- a/contrib/llvm/tools/lld/ELF/EhFrame.cpp +++ b/contrib/llvm/tools/lld/ELF/EhFrame.cpp @@ -117,9 +117,8 @@ template uint8_t getFdeEncoding(ArrayRef D) { StringRef Aug(reinterpret_cast(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); -- cgit v1.1