svn commit: r313773 - stable/11/contrib/llvm/tools/lld/ELF

Ed Maste emaste at FreeBSD.org
Wed Feb 15 15:18:45 UTC 2017


Author: emaste
Date: Wed Feb 15 15:18:43 2017
New Revision: 313773
URL: https://svnweb.freebsd.org/changeset/base/313773

Log:
  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

Modified:
  stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp
==============================================================================
--- stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp	Wed Feb 15 14:56:47 2017	(r313772)
+++ stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp	Wed Feb 15 15:18:43 2017	(r313773)
@@ -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);


More information about the svn-src-all mailing list