diff --git a/src/p_w32pe.cpp b/src/p_w32pe.cpp index dfe7ee4e..f433db39 100644 --- a/src/p_w32pe.cpp +++ b/src/p_w32pe.cpp @@ -218,7 +218,7 @@ void PackW32Pe::processTls(Interval *iv) // pass 1 //fprintf(stderr, "TLS callbacks: 0x%0x -> 0x%0x\n", (int)tlsp->callbacks, v); throwCantPack("TLS callbacks are not supported"); } -#endif +#endif if(v != 0) { //count number of callbacks, just for information string - Stefan Widmann @@ -839,11 +839,11 @@ void PackW32Pe::pack(OutputFile *fo) } } - //remove certificate directory entry + //remove certificate directory entry if (IDSIZE(PEDIR_SEC)) IDSIZE(PEDIR_SEC) = IDADDR(PEDIR_SEC) = 0; - //check CLR Runtime Header directory entry + //check CLR Runtime Header directory entry if (IDSIZE(PEDIR_COMRT)) throwCantPack(".NET files (win32/.net) are not yet supported"); @@ -871,7 +871,7 @@ void PackW32Pe::pack(OutputFile *fo) #if 0 //subsystem check moved to switch ... case above - Stefan Widmann if (!opt->force && ih.subsystem == 1) throwCantPack("subsystem 'native' is not supported (try --force)"); -#endif +#endif if (ih.filealign < 0x200) throwCantPack("filealign < 0x200 is not yet supported"); diff --git a/src/p_w32pe.h b/src/p_w32pe.h index fb839bd8..42abcf9d 100644 --- a/src/p_w32pe.h +++ b/src/p_w32pe.h @@ -63,7 +63,7 @@ protected: virtual void processTls(Interval *); //NEW: TLS callback handling - Stefan Widmann void processTls(Reloc *, const Interval *, unsigned); //NEW: TLS callback handling - Stefan Widmann - + void processLoadConf(Reloc *, const Interval *, unsigned); void processLoadConf(Interval *); upx_byte *oloadconf; @@ -71,7 +71,7 @@ protected: unsigned tlscb_ptr; //NEW: TLS callback handling - Stefan Widmann //unsigned tlscb_off; //NEW: TLS callback handling - Stefan Widmann - + bool isrtm; bool use_dep_hack; bool use_clear_dirty_stack; diff --git a/src/pefile.h b/src/pefile.h index 3330a636..22baaa19 100644 --- a/src/pefile.h +++ b/src/pefile.h @@ -214,7 +214,7 @@ protected: DLL_FLAG = 0x2000, FBIG_ENDIAN = 0x8000 }; - + //NEW: DLL characteristics definition for ASLR, ... - Stefan Widmann enum { IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE = 0x0040, diff --git a/src/stub/src/i386-win32.pe.S b/src/stub/src/i386-win32.pe.S index 5744ca69..3f4d64cc 100644 --- a/src/stub/src/i386-win32.pe.S +++ b/src/stub/src/i386-win32.pe.S @@ -135,7 +135,7 @@ next_imp: add ebx, 4 jmps next_func imp_failed: - + section PEIERDLL popa xor eax, eax @@ -222,7 +222,7 @@ section PEDEPHAK pedep9: pop eax //;restore stack -//;NEW: TLS callback support - Stefan Widmann +//;NEW: TLS callback support - Stefan Widmann section PETLSC lea ebx, [esi + tls_module_base] //;load module base to ebx lea eax, [esi + tls_callbacks_ptr] //;load pointer to original callback chain @@ -267,12 +267,12 @@ section PERETURN section PEDOJUMP jmp original_entry -section PETLSC2 +section PETLSC2 //;TLS_CALLBACK(hModule, reason, reserved) tls_handler_start: push esi .byte 0xBE //mov esi, XXXXXXXX -tlsc_chain_ptr: +tlsc_chain_ptr: .byte 0, 0, 0, 0 cld //;you never know, this code gets called by the PE loader walk_tlsc_chain2: @@ -290,7 +290,7 @@ push_loop: done_callbacks: pop esi ret 0x0C - + // ============= // ============= CUT HERE // =============