diff --git a/Output.m b/Output.m index 7c08e91..c418d6c 100644 --- a/Output.m +++ b/Output.m @@ -2,9 +2,12 @@ #define IMPOSTOR_OBJC_OLD "dsce.objc.old" #define IMPOSTOR_GOT "dsce.got" #define IMPOSTOR_PAD "dsce.pad" -#define HEADER_EXTRA 0x1000 #define IMPORT_HACK_OFFSET 0x1000000000 +// TODO: broken currently + +#define HEADER_EXTRA 0 // 0x1000 + // https://en.wikipedia.org/wiki/LEB128 NSData* ulebWithLong(long value) @@ -127,6 +130,7 @@ -(void)stepImportHeader self.header=ImageHeader.alloc.initEmpty.autorelease; self.header.header->flags=self.cacheImage.header.header->flags; + self.header.header->flags&=~MH_DYLIB_IN_CACHE; __block int copied=0; __block int skipped=0; @@ -903,7 +907,7 @@ -(void)stepFixSelRefs long* refs=(long*)wrapOffset(self,section->offset).pointer; int count=section->size/sizeof(long); - trace(@"fixing %x selector refs",count); + trace(@"fix %x selector refs",count); for(int index=0;indexoffset).pointer; int count=section->size/sizeof(long); - trace(@"fixing %x classes",count); + trace(@"fix %x classes",count); for(int index=0;indexoffset).pointer; int count=section->size/sizeof(long); - trace(@"fixing %x categories",count); + trace(@"fix %x categories",count); for(int index=0;indexoffset).pointer; int count=section->size/sizeof(long); - trace(@"fixing %x protocol refs",count); + trace(@"fix %x protocol refs",count); for(int index=0;indexoffset).pointer; int count=section->size/sizeof(long); - trace(@"fixing %x protocols",count); + trace(@"fix %x protocols",count); for(int index=0;indexoffset).pointer; int count=section->size/sizeof(int); - trace(@"fixing %x initializer offsets",count); + trace(@"fix %x initializer offsets (delta %lx)",count,self.baseAddressDelta); for(int index=0;index