================ Comment at: lib/ReaderWriter/ELF/Writer.cpp:83 @@ -81,2 +82,3 @@ + _runtimeFile(ti) { _layout = new DefaultLayout<ELFT>(ti); } ---------------- This needs to be changed to use the target layout instead of default layout. Other than that it looks good. http://llvm-reviews.chandlerc.com/D350