Preserve Mach_segment_header.flags; fix non-PIE main programs on MacOS.

https://github.com/upx/upx/issues/222
	modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   stub/src/amd64-darwin.macho-entry.S
	also *.macho-*.h, *.macho-fold.map, amd64-darwin.macho-entry.bin.dump
This commit is contained in:
John Reiser
2018-09-22 18:45:44 -07:00
parent c1cfde21d7
commit 4d1c754af9
11 changed files with 737 additions and 700 deletions
+1
View File
@@ -823,6 +823,7 @@ protected:
unsigned o__mod_init_func; // file offset to __DATA.__mod_init_func Mach_section_command
upx_uint64_t prev_mod_init_func;
upx_uint64_t pagezero_vmsize;
upx_uint64_t vma_max; // max over (.vmsize + .vmaddr)
Mach_header mhdri;
Mach_header mhdro;