diff --git a/BUGS b/BUGS index 5c4355b4..d2f088c6 100644 --- a/BUGS +++ b/BUGS @@ -28,7 +28,7 @@ dos/exe watcom/le --------- * 16-bit selector alias fixups - * 16-bit offset relocation for objects larger than 4 kB + * 16-bit offset relocation for objects larger than 4 KiB * 16:16 fixups If you need any of the above (they're very rare), send us an URL of a diff --git a/NEWS b/NEWS index c1992032..9f0732f6 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,7 @@ User visible changes for UPX Changes in 3.03 (27 Apr 2008): * implement cache flushing for PowerPC (esp. model 440) - * fix cache flushing on MIPS (>3MB compressed, or with holes) + * fix cache flushing on MIPS (>3 MiB compressed, or with holes) * fix MIPS big-endian * bug fixes diff --git a/doc/elf-to-mem.txt b/doc/elf-to-mem.txt index 0f4a914e..2a5d305b 100644 --- a/doc/elf-to-mem.txt +++ b/doc/elf-to-mem.txt @@ -46,8 +46,8 @@ may not be used to take the address of a function. The address 0x00400000 was chosen to be out of the way of the usual load address 0x08048000, and to minimize fragmentation in kernel -page tables; one page of page tables covers 4MB. The address -0x00401000 was chosen as 1 page up from a 64KB boundary, to +page tables; one page of page tables covers 4 MiB. The address +0x00401000 was chosen as 1 page up from a 64 KiB boundary, to make the startup code and its constants smaller. Decompression of the executable begins by decompressing the Elf32_Ehdr diff --git a/doc/filter.txt b/doc/filter.txt index 4dcc2e7a..f0238210 100644 --- a/doc/filter.txt +++ b/doc/filter.txt @@ -108,14 +108,14 @@ then skip another one - the unfiltering process needs some information to be able to reverse the filtering. UPX uses the following idea, which works nicely. First we assume that -the size of the area that should be filtered is less than 16MB. Then +the size of the area that should be filtered is less than 16 MiB. Then UPX scans over this area and keeps a record of the bytes that are following the 0xE8 bytes. If we are lucky, there will be bytes that were not found following 0xE8. These bytes are our candidates to be used as markers. Do you still remember that we assumed that the size of scanned area is -less than 16MB? Well, this means that when we process a real call, the +less than 16 MiB? Well, this means that when we process a real call, the resulting offset will be less than 0x00FFFFFF too. So the MSB is always 0x00. Which is a nice place to store our marker. Of course we should reverse the byte order in the resulting offset - so this marker will diff --git a/doc/upx.pod b/doc/upx.pod index 28ac78c8..628054f2 100644 --- a/doc/upx.pod +++ b/doc/upx.pod @@ -51,8 +51,8 @@ B is a versatile executable packer with the following features: - excellent compression ratio: compresses better than zip/gzip, use UPX to decrease the size of your distribution ! - - very fast decompression: about 10 MB/sec on an ancient Pentium 133, - about 200 MB/sec on an Athlon XP 2000+. + - very fast decompression: about 10 MiB/sec on an ancient Pentium 133, + about 200 MiB/sec on an Athlon XP 2000+. - no memory overhead for your compressed executables for most of the supported formats @@ -153,7 +153,7 @@ as compared to the first decompressed version.] B offers ten different compression levels from B<-1> to B<-9>, and B<--best>. The default compression level is B<-8> for files -smaller than 512 kB, and B<-7> otherwise. +smaller than 512 KiB, and B<-7> otherwise. =over 4 @@ -349,7 +349,7 @@ Extra options available for this executable format: First of all, it is recommended to use B *instead* of B. strip has the very bad habit of replacing your stub with its own (outdated) version. Additionally B corrects a bug/feature in strip v2.8.x: it -will fix the 4 KByte alignment of the stub. +will fix the 4 KiB alignment of the stub. B includes the full functionality of stubify. This means it will automatically stubify your COFF files. Use the option B<--coff> to @@ -660,8 +660,8 @@ Specific drawbacks: - Because of temporary decompression to disk the decompression speed is not as fast as with the other executable formats. Still, I can see - no noticeable delay when starting programs like my ~3 MB emacs (which - is less than 1 MB when compressed :-). + no noticeable delay when starting programs like my ~3 MiB emacs (which + is less than 1 MiB when compressed :-). Extra options available for this executable format: @@ -681,7 +681,7 @@ nostalgic feelings of one of the authors. Packed programs will be byte-identical to the original after uncompression, until further notice. -Maximum uncompressed size: ~1.89 / ~7.60 Mbytes. +Maximum uncompressed size: ~1.89 / ~7.60 MiB. Notes: @@ -708,7 +708,7 @@ Extra options available for this executable format: --8-bit Uses 8 bit size compression [default: 32 bit] - --8mb-ram PSone has 8 MB ram available [default: 2 MB] + --8mib-ram PSone has 8 MiB ram available [default: 2 MiB] --boot-only This format is for main exes and CD-Mastering only ! It may slightly improve the compression ratio, @@ -838,7 +838,7 @@ must end with ".scr" (as screensavers are handled slightly different than normal exe files). UPX compressed PE files have some minor memory overhead (usually in the -10 - 30 kbytes range) which can be seen by specifying the "-i" command +10 - 30 KiB range) which can be seen by specifying the "-i" command line switch during compression. Extra options available for this executable format: diff --git a/src/compress_lzma.cpp b/src/compress_lzma.cpp index c1f06a0a..80be70a2 100644 --- a/src/compress_lzma.cpp +++ b/src/compress_lzma.cpp @@ -276,7 +276,7 @@ int upx_lzma_compress ( const upx_bytep src, unsigned src_len, #if 0 // DEBUG - set sizes so that we use a maxmimum amount of stack. // These settings cause res->num_probs == 3147574, i.e. we will - // need about 6 MB of stack during runtime decompression. + // need about 6 MiB of stack during runtime decompression. pr[1].uintVal = 4; pr[2].uintVal = 8; #endif diff --git a/src/filter/cto.h b/src/filter/cto.h index eceda751..5c09577e 100644 --- a/src/filter/cto.h +++ b/src/filter/cto.h @@ -47,7 +47,7 @@ static int F(Filter *f) unsigned calls = 0, noncalls = 0, noncalls2 = 0; unsigned lastnoncall = size, lastcall = 0; - // find a 16MB large empty address space + // find a 16 MiB large empty address space { unsigned char buf[256]; memset(buf,0,256); diff --git a/src/filter/ctoj.h b/src/filter/ctoj.h index e02e04b0..9010d91d 100644 --- a/src/filter/ctoj.h +++ b/src/filter/ctoj.h @@ -51,7 +51,7 @@ static int F(Filter *f) unsigned calls = 0, noncalls = 0, noncalls2 = 0; unsigned lastnoncall = size, lastcall = 0; - // find a 16MB large empty address space + // find a 16 MiB large empty address space { unsigned char buf[256]; memset(buf,0,256); diff --git a/src/filter/ctojr.h b/src/filter/ctojr.h index 2f307d2f..89870dc6 100644 --- a/src/filter/ctojr.h +++ b/src/filter/ctojr.h @@ -123,8 +123,8 @@ static int F(Filter *f) N_MRU : 0; #endif //} - // FIXME: We must fit into 8MB because we steal one bit. - // find a 16MB large empty address space + // FIXME: We must fit into 8 MiB because we steal one bit. + // find a 16 MiB large empty address space { int which; unsigned char buf[256]; diff --git a/src/filter/ctok.h b/src/filter/ctok.h index 6dc8d8fc..abadbc21 100644 --- a/src/filter/ctok.h +++ b/src/filter/ctok.h @@ -52,7 +52,7 @@ static int F(Filter *f) unsigned calls = 0, noncalls = 0, noncalls2 = 0; unsigned lastnoncall = size, lastcall = 0; - // find a 16MB large empty address space + // find a 16 MiB large empty address space { unsigned char buf[256]; memset(buf,0,256); diff --git a/src/help.cpp b/src/help.cpp index 1bd500a3..682d203b 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -263,7 +263,7 @@ void show_help(int verbose) fg = con_fg(f,fg); con_fprintf(f, " --8-bit uses 8 bit size compression [default: 32 bit]\n" - " --8mb-ram 8 megabyte memory limit [default: 2 mb]\n" + " --8mib-ram 8 megabyte memory limit [default: 2 MiB]\n" " --boot-only disables client/host transfer compatibility\n" " --no-align don't align to 2048 bytes [enables: --console-run]\n" "\n"); diff --git a/src/main.cpp b/src/main.cpp index 51b7563c..24cd5fc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -881,7 +881,7 @@ static int do_option(int optc, const char *arg) opt->ps1_exe.do_8bit = true; break; case 673: - opt->ps1_exe.do_8mb = false; + opt->ps1_exe.do_8mib = false; break; case '\0': @@ -1045,6 +1045,7 @@ static const struct mfx_option longopts[] = {"boot-only", 0x10, 0, 670}, {"no-align", 0x10, 0, 671}, {"8-bit", 0x10, 0, 672}, + {"8mib-ram", 0x10, 0, 673}, {"8mb-ram", 0x10, 0, 673}, // mp (meta) options diff --git a/src/options.h b/src/options.h index 8e2d87f0..9d19c7a4 100644 --- a/src/options.h +++ b/src/options.h @@ -134,7 +134,7 @@ struct options_t { bool boot_only; bool no_align; bool do_8bit; - bool do_8mb; + bool do_8mib; } ps1_exe; struct { unsigned blocksize; diff --git a/src/p_armpe.cpp b/src/p_armpe.cpp index 90fdccde..56b33a8a 100644 --- a/src/p_armpe.cpp +++ b/src/p_armpe.cpp @@ -714,7 +714,7 @@ void PackArmPe::pack(OutputFile *fo) // limit stack size needed for runtime decompression upx_compress_config_t cconf; cconf.reset(); - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 2048, &cconf, filter_strategy, ih.codebase, rvamin, 0, NULL, 0); // info: see buildLoader() @@ -898,7 +898,7 @@ void PackArmPe::pack(OutputFile *fo) // set_le32(ibuf + ic,get_le32("UPX ")); ibuf.clear(0, oh.filealign); - info("Image size change: %u -> %u kBytes", + info("Image size change: %u -> %u KiB", ih.imagesize / 1024, oh.imagesize / 1024); infoHeader("[Writing compressed file]"); diff --git a/src/p_djgpp2.cpp b/src/p_djgpp2.cpp index ac6b1433..6a1dc5ac 100644 --- a/src/p_djgpp2.cpp +++ b/src/p_djgpp2.cpp @@ -303,7 +303,7 @@ void PackDjgpp2::pack(OutputFile *fo) // compress upx_compress_config_t cconf; cconf.reset(); // limit stack size needed for runtime decompression - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 512, &cconf); // patch coff header #2 diff --git a/src/p_exe.cpp b/src/p_exe.cpp index 6acf5739..e9add672 100644 --- a/src/p_exe.cpp +++ b/src/p_exe.cpp @@ -506,7 +506,7 @@ void PackExe::pack(OutputFile *fo) // compress (max_match = 8192) upx_compress_config_t cconf; cconf.reset(); cconf.conf_ucl.max_match = MAXMATCH; - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 32, &cconf); if (M_IS_NRV2B(ph.method) || M_IS_NRV2D(ph.method) || M_IS_NRV2E(ph.method)) diff --git a/src/p_ps1.cpp b/src/p_ps1.cpp index 0419687c..17c08594 100644 --- a/src/p_ps1.cpp +++ b/src/p_ps1.cpp @@ -95,7 +95,7 @@ PackPs1::PackPs1(InputFile *f) : COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40) fdata_size = file_size - PS_HDR_SIZE; - ram_size = !opt->ps1_exe.do_8mb ? 0x200000 : 0x800000; + ram_size = !opt->ps1_exe.do_8mib ? 0x200000 : 0x800000; } const int *PackPs1::getCompressionMethods(int method, int level) const @@ -500,7 +500,7 @@ void PackPs1::pack(OutputFile *fo) // compress (max_match = 65535) upx_compress_config_t cconf; cconf.reset(); cconf.conf_ucl.max_match = 65535; - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, sa_cnt, &cconf); if (overlap) diff --git a/src/p_tmt.cpp b/src/p_tmt.cpp index 9b149b9b..83081c3d 100644 --- a/src/p_tmt.cpp +++ b/src/p_tmt.cpp @@ -242,7 +242,7 @@ void PackTmt::pack(OutputFile *fo) // compress upx_compress_config_t cconf; cconf.reset(); // limit stack size needed for runtime decompression - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 512, &cconf); const unsigned lsize = getLoaderSize(); diff --git a/src/p_tos.cpp b/src/p_tos.cpp index 71f0e2e1..c86dc17a 100644 --- a/src/p_tos.cpp +++ b/src/p_tos.cpp @@ -507,7 +507,7 @@ void PackTos::pack(OutputFile *fo) // compress (max_match = 65535) upx_compress_config_t cconf; cconf.reset(); cconf.conf_ucl.max_match = 65535; - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 512, &cconf); // diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index ea5fc237..c6ac185c 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -269,7 +269,7 @@ void PackVmlinuxBase::pack(OutputFile *fo) upx_compress_config_t cconf; cconf.reset(); // limit stack size needed for runtime decompression - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack unsigned ppc32_extra = 0; if (Ehdr::EM_PPC==my_e_machine) { @@ -837,7 +837,7 @@ const int *PackVmlinuxPPC32::getFilters() const bool PackVmlinuxI386::is_valid_e_entry(Addr e_entry) { - return 0==(0x000fffff & e_entry); // entry on whole 1MB + return 0==(0x000fffff & e_entry); // entry on whole 1 MiB } @@ -1390,8 +1390,8 @@ bool PackVmlinuxAMD64::has_valid_vmlinux_head() // pushl $0 // pushl $ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED // pushl $ PROT_EXEC | PROT_WRITE | PROT_READ -// pushl $0x600000 # 6MB length -// pushl $0x100000 # 1MB address +// pushl $0x600000 # 6 MiB length +// pushl $0x100000 # 1 MiB address // call mmap // leal -0x9000(%esp),%esi # expect "lea 0x9000(%esi),%esp" later ///* Fall into .text of upx-compressed vmlinux. */ @@ -1440,7 +1440,7 @@ const int *PackVmlinuxAMD64::getFilters() const bool PackVmlinuxAMD64::is_valid_e_entry(Addr e_entry) { - return 0x200000<=e_entry; // 2MB + return 0x200000<=e_entry; // 2 MiB } Linker* PackVmlinuxAMD64::newLinker() const diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 96d85cfd..84f4feb0 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -193,14 +193,14 @@ int PackVmlinuzI386::decompressKernel() } // Find "ljmp $__BOOT_CS,$__PHYSICAL_START" if any. if (0==memcmp("\xEA\x00\x00", p, 3) && 0==(0xf & p[3]) && 0==p[4]) { - /* whole megabyte < 16MB */ + /* whole megabyte < 16 MiB */ physical_start = get_te32(1+ p); break; } } if (base && relocated) { p = base + relocated; - for (int j= 0; j < 0x200; ++j, ++p) { + for (j = 0; j < 0x200; ++j, ++p) { if (0==memcmp("\x01\x9c\x0b", p, 3) // addl %ebx,d32(%ebx,%ecx) ) { page_offset = 0u - get_te32(3+ p); @@ -392,7 +392,7 @@ void PackVmlinuzI386::pack(OutputFile *fo) // compress upx_compress_config_t cconf; cconf.reset(); // limit stack size needed for runtime decompression - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(&ft, 512, &cconf); const unsigned lsize = getLoaderSize(); @@ -611,7 +611,7 @@ int PackVmlinuzI386::canUnpack() void PackVmlinuzI386::unpack(OutputFile *fo) { // no uncompression support for this format, so that - // it is possible to remove the original deflate code (>10KB) + // it is possible to remove the original deflate code (>10 KiB) // FIXME: but we could write the uncompressed "vmlinux" image diff --git a/src/p_w32pe.cpp b/src/p_w32pe.cpp index 037534ea..ed5056a6 100644 --- a/src/p_w32pe.cpp +++ b/src/p_w32pe.cpp @@ -1037,7 +1037,7 @@ void PackW32Pe::pack(OutputFile *fo) // set_le32(ibuf + ic,get_le32("UPX ")); ibuf.clear(0, oh.filealign); - info("Image size change: %u -> %u kBytes", + info("Image size change: %u -> %u KiB", ih.imagesize / 1024, oh.imagesize / 1024); infoHeader("[Writing compressed file]"); diff --git a/src/p_wcle.cpp b/src/p_wcle.cpp index 7d48e8f4..07cb7078 100644 --- a/src/p_wcle.cpp +++ b/src/p_wcle.cpp @@ -433,7 +433,7 @@ void PackWcle::encodeImage(Filter *ft) // prepare filter [already done] // compress upx_compress_config_t cconf; cconf.reset(); - cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack + cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28 KiB stack compressWithFilters(ibuf, isize, oimage + RESERVED, ibuf + ft->addvalue, ft->buf_len, diff --git a/src/stub/src/amd64-linux.elf-entry.S b/src/stub/src/amd64-linux.elf-entry.S index 30b0ed4e..815ada93 100644 --- a/src/stub/src/amd64-linux.elf-entry.S +++ b/src/stub/src/amd64-linux.elf-entry.S @@ -225,7 +225,7 @@ unfold: /* Get some pages. If small, then get 1 page located just after the end of the first PT_LOAD of the compressed program. This will still be below - all of the uncompressed program. If large (>=3MB uncompressed), then enough + all of the uncompressed program. If large (>=3 MiB uncompressed), then enough to duplicate the entire compressed PT_LOAD, plus 1 page, located just after the brk() of the _un_compressed program. The address and length are pre- calculated by PackLinuxElf64amd::defineSymbols(). diff --git a/src/stub/src/arm-linux.kernel.vmlinux.S b/src/stub/src/arm-linux.kernel.vmlinux.S index 8d0fba6a..9869b229 100644 --- a/src/stub/src/arm-linux.kernel.vmlinux.S +++ b/src/stub/src/arm-linux.kernel.vmlinux.S @@ -56,7 +56,7 @@ decompress_kernel: # (char *out, char *tmp, char *tmp_end, int arch_id) // Value stored from r1 to memory will be overwritten by outsize. stmdb r1!,{r0,r1,r2,r3,sp} // &indata, space, &outdata, arch_id, sp_in loadcon8 3,METHOD // mov r3,#METHOD - mov sp,r1 // switch stacks to tmp_end area (64KB) + mov sp,r1 // switch stacks to tmp_end area (64 KiB) ldr r1,1f // insize str r3,[sp,#-4]! // method ldr r3,2f // outsize diff --git a/src/stub/src/i086-dos16.exe.S b/src/stub/src/i086-dos16.exe.S index 57b69ba0..2c2ecef3 100644 --- a/src/stub/src/i086-dos16.exe.S +++ b/src/stub/src/i086-dos16.exe.S @@ -99,7 +99,7 @@ section EXEENTRY push ds .byte 0xa9 do_copy: - mov ch, 0x80 /* 64 kbyte */ + mov ch, 0x80 /* 64 KiB */ mov ax, cs addaxds: add ax, offset source_segment /* MSB is referenced by the "sub" below */ diff --git a/src/stub/src/i386-linux.elf-fold.lds b/src/stub/src/i386-linux.elf-fold.lds index f6d41f3e..30a8e806 100644 --- a/src/stub/src/i386-linux.elf-fold.lds +++ b/src/stub/src/i386-linux.elf-fold.lds @@ -38,7 +38,7 @@ PHDRS } SECTIONS { - /* 0x00c01000: 12MB+4KB for Fedora Core 5 vDSO at 0xc00000 */ + /* 0x00c01000: 12 MiB + 4 KiB for Fedora Core 5 vDSO at 0xc00000 */ . = 0x00c01000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */ .text : { *(.text) diff --git a/src/stub/src/i386-linux.kernel.vmlinuz.S b/src/stub/src/i386-linux.kernel.vmlinuz.S index f7aeac83..a3ac02c8 100644 --- a/src/stub/src/i386-linux.kernel.vmlinuz.S +++ b/src/stub/src/i386-linux.kernel.vmlinuz.S @@ -159,7 +159,7 @@ setcursor: mov al,15; call outb_p; inc edx mov al,cl // jmp outb_p - + outb_p: outb dx,al call 0f; 0: // insure minimum delay between 'outb' diff --git a/src/stub/src/i386-openbsd.elf-main.c b/src/stub/src/i386-openbsd.elf-main.c index d44bc5fc..06611127 100644 --- a/src/stub/src/i386-openbsd.elf-main.c +++ b/src/stub/src/i386-openbsd.elf-main.c @@ -371,7 +371,7 @@ umax(unsigned a, unsigned b) // OpenBSD 3.9 wants all .text from all modules together, then (above that) // all .data from all modules together, in order to maximize the effectiveness // of lowering the segment limit on %cs as an implementation of "no-execute -// .data". Thus OpenBSD 3.9 puts a gap of 0x20000000 (512MB) between the +// .data". Thus OpenBSD 3.9 puts a gap of 0x20000000 (512 MiB) between the // origins of .text and .data in each module. So, mapping ET_DYN must "level" // the excursion in .text and .data of anything which preceeded it, // then add the new PT_LOAD. diff --git a/src/stub/src/mipsel.r3000-linux.elf-entry.S b/src/stub/src/mipsel.r3000-linux.elf-entry.S index b5cf6f4d..6b27dd95 100644 --- a/src/stub/src/mipsel.r3000-linux.elf-entry.S +++ b/src/stub/src/mipsel.r3000-linux.elf-entry.S @@ -281,7 +281,7 @@ unfold: // s7= &decompress; s6= &b_info(fold); s5= sz_pack2 /* Get some pages. If small, then get 1 page located just after the end of the first PT_LOAD of the compressed program. This will still be below - all of the uncompressed program. If large (>=3MB uncompressed), then enough + all of the uncompressed program. If large (>=3 MiB uncompressed), then enough to duplicate the entire compressed PT_LOAD, plus 1 page, located just after the brk() of the _un_compressed program. The address and length are pre- calculated by PackLinuxElf64amd::defineSymbols(). diff --git a/src/stub/src/powerpc-darwin.macho-fold.S b/src/stub/src/powerpc-darwin.macho-fold.S index 7baecd23..1572f7a2 100644 --- a/src/stub/src/powerpc-darwin.macho-fold.S +++ b/src/stub/src/powerpc-darwin.macho-fold.S @@ -71,7 +71,7 @@ L90: lwz a1,-8(r31) # offset to {l_info; p_info; b_info} subf a0,a1,r31 # &l_info lwz a3,sz_unc+sz_p_info+sz_l_info(a0) # sz_mach_headers - cmpli 0,a3,2048; bgt L100; li a3,2048 # at least 2KB for /usr/lib/dyld + cmpli 0,a3,2048; bgt L100; li a3,2048 # at least 2 KiB for /usr/lib/dyld L100: movr r29,sp # remember for restoring later subf sp,a3,sp # alloca