svn commit: r313458 - head/contrib/llvm/tools/lld/ELF

Ed Maste emaste at FreeBSD.org
Wed Feb 8 20:31:55 UTC 2017


Author: emaste
Date: Wed Feb  8 20:31:54 2017
New Revision: 313458
URL: https://svnweb.freebsd.org/changeset/base/313458

Log:
  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
  Reported by:	Wolfgang Meyer
  Obtained from:	Upstream LLD r277105
  MFC after:	1 week

Modified:
  head/contrib/llvm/tools/lld/ELF/EhFrame.cpp

Modified: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp
==============================================================================
--- head/contrib/llvm/tools/lld/ELF/EhFrame.cpp	Wed Feb  8 20:21:29 2017	(r313457)
+++ head/contrib/llvm/tools/lld/ELF/EhFrame.cpp	Wed Feb  8 20:31:54 2017	(r313458)
@@ -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