i386-darwin.dylib requires existing LC_ROUINTES command;

decompressor must not overwrite Mach_headers.
This commit is contained in:
John Reiser
2009-05-19 09:43:05 -07:00
parent 84ac771893
commit 3e8d072d24
4 changed files with 2015 additions and 1999 deletions
+2 -1
View File
@@ -500,6 +500,7 @@ protected:
unsigned sz_mach_headers;
Mach_segment_command *rawmseg; // as input, with sections
Mach_segment_command *msegcmd; // LC_SEGMENT first, without sections
unsigned o_routines_cmd; // file offset to LC_ROUINTES
Mach_header mhdri;
Mach_header mhdro;
@@ -618,7 +619,7 @@ class PackDylibI386 : public PackMachI386 //PackMachBase<MachClass_LE32>
typedef PackMachI386 /*PackMachBase<MachClass_LE32>*/ super;
public:
PackDylibI386(InputFile *f) : super(f) { my_filetype = Mach_header::MH_DYLIB; }
PackDylibI386(InputFile *f);
virtual int getFormat() const { return UPX_F_DYLIB_i386; }
virtual const char *getName() const { return "Dylib/i386"; }