diff --git a/src/conf.h b/src/conf.h index 9333bb6c..8349b1cd 100644 --- a/src/conf.h +++ b/src/conf.h @@ -189,7 +189,7 @@ typedef unsigned char byte; #define upx_byte byte #define upx_bytep byte * typedef unsigned char uchar; -// UPX convention: use "charptr" when dealing with abstract pointer arithmetics +// UPX convention: use "charptr" when dealing with abstract pointer arithmetic #define charptr upx_charptr_unit_type * // upx_charptr_unit_type is some opaque type with sizeof(type) == 1 //// typedef char upx_charptr_unit_type; // also works diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index e19f2103..082e2a6d 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -5440,8 +5440,8 @@ unsigned PackLinuxElf::pack2_shlib_overlay_compress( // LOAD 0x002000 0x00002000 0x00002000 0x09d40 0x09d40 R 0x1000 large app consts // LOAD 0x00bef0 0x0000cef0 0x0000cef0 0x00118 0x0011c RW 0x1000 writeable // -// xct_off will have been increased artifically to point to -// the large compressable PT_LOAD (0x9d40==MemSiz), in order to avoid +// xct_off will have been increased artificially to point to +// the large compressible PT_LOAD (0x9d40==MemSiz), in order to avoid // NotCompressable because the earlier PT_LOADs were too short (< 4KiB). // 2. If the first PT_LOAD covers xct_off, then the order of output is: // A. original Ehdr+Phdrs (overwritten later) @@ -6178,7 +6178,7 @@ unsigned PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho) && want_types_mask & (1<<(0x1f & sh_type))) || (Elf32_Shdr::SHT_ARM_ATTRIBUTES == sh_type) ) { - *sh_out = *sh_in; // *sh_in is a candidate for fowarding + *sh_out = *sh_in; // *sh_in is a candidate for forwarding if (sh_offset > xct_off) { // may slide down: earlier compression if (sh_offset >= xct_off_hi) { // easy: so_slide down if (Elf32_Shdr::SHT_ARM_ATTRIBUTES != sh_type) { @@ -6238,7 +6238,7 @@ unsigned PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho) do { // stupid MSVC lacks stpcpy() *ptr_shstrings++ = *name; } while (*name++); - ++sh_out; ++n_sh_out; // actually commit the fowarding + ++sh_out; ++n_sh_out; // actually commit the forwarding } } unsigned len = ptr_shstrings - (char *)mb_shstrings.getVoidPtr(); diff --git a/src/p_ps1.cpp b/src/p_ps1.cpp index 5d2a7296..e3dc1776 100644 --- a/src/p_ps1.cpp +++ b/src/p_ps1.cpp @@ -69,7 +69,7 @@ static const CLANG_FORMAT_DUMMY_STATEMENT // rest is filled with zeros to reach the required // cd mode 2 data sector size of 2048 bytes // body: contains the binary data / code of the executable -// reqiures: executable code must be aligned to 4 +// requires: executable code must be aligned to 4 // must be aligned to 2048 to run from a CD // optional: not aligned to 2048 (for console run only) **************************************************************************/ diff --git a/src/p_unix.cpp b/src/p_unix.cpp index 16f36988..c4abaf85 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -58,7 +58,7 @@ PackUnix::PackUnix(InputFile *f) : // opt->o_unix.android_shlib is global, but must be hint // that applies only when an actual ET_DYN on EM_ARM (only!). - // User might say "--android-shlib" but give mulitple files + // User might say "--android-shlib" but give multiple files // where some are ET_EXEC. saved_opt_android_shlib = opt->o_unix.android_shlib; opt->o_unix.android_shlib = 0; // Must apply selectively diff --git a/src/stub/src/arch/i386/bxx.S b/src/stub/src/arch/i386/bxx.S index 458e576a..f44db639 100644 --- a/src/stub/src/arch/i386/bxx.S +++ b/src/stub/src/arch/i386/bxx.S @@ -30,7 +30,7 @@ i386bxx: # (*f_unf)(xo->buf, out_len, h.b_cto8, h.b_ftid); mov 4*NBPW(%esp),%eax # ftid #ifndef NO_METHOD_CHECK // Filter 0x46 is 5-byte CALL or unconditional JMP -// FIlter 0x49 also includes 6-byte consitional Jxx +// FIlter 0x49 also includes 6-byte conditional Jxx cmpl $0x49,%eax; je cktop cmpl $0x46,%eax; je cktop jmp ckend0 diff --git a/src/stub/src/arch/m68k/nrv2b_d.ash b/src/stub/src/arch/m68k/nrv2b_d.ash index 01fbd171..230b9f96 100644 --- a/src/stub/src/arch/m68k/nrv2b_d.ash +++ b/src/stub/src/arch/m68k/nrv2b_d.ash @@ -54,7 +54,7 @@ ; ; ; Notes: -; we have max_match = 65535, so we can use word arithmetics on d2 +; we have max_match = 65535, so we can use word arithmetic on d2 ; diff --git a/src/stub/src/arch/m68k/nrv2d_d.ash b/src/stub/src/arch/m68k/nrv2d_d.ash index 01443073..44d9b1cc 100644 --- a/src/stub/src/arch/m68k/nrv2d_d.ash +++ b/src/stub/src/arch/m68k/nrv2d_d.ash @@ -54,8 +54,8 @@ ; ; ; Notes: -; we have max_match = 65535, so we can use word arithmetics on d2 -; we have max_offset < 2**23, so we can use partial word arithmetics on d1 +; we have max_match = 65535, so we can use word arithmetic on d2 +; we have max_offset < 2**23, so we can use partial word arithmetic on d1 ; diff --git a/src/stub/src/arch/m68k/nrv2e_d.ash b/src/stub/src/arch/m68k/nrv2e_d.ash index 6f8c2c04..3a814caf 100644 --- a/src/stub/src/arch/m68k/nrv2e_d.ash +++ b/src/stub/src/arch/m68k/nrv2e_d.ash @@ -54,8 +54,8 @@ ; ; ; Notes: -; we have max_match = 65535, so we can use word arithmetics on d2 -; we have max_offset < 2**23, so we can use partial word arithmetics on d1 +; we have max_match = 65535, so we can use word arithmetic on d2 +; we have max_offset < 2**23, so we can use partial word arithmetic on d1 ; */ diff --git a/src/stub/src/arm64-linux.elf-entry.S b/src/stub/src/arm64-linux.elf-entry.S index 4a537faa..4222bd9e 100644 --- a/src/stub/src/arm64-linux.elf-entry.S +++ b/src/stub/src/arm64-linux.elf-entry.S @@ -484,7 +484,7 @@ f_expand: // only one decompressor; build 'eof' return #undef DAISY_CHAIN -// use of mmap() forces implcit cache sync +// use of mmap() forces implicit cache sync #define NO_SYNC_CACHE 1 #include "arch/arm64/v8/nrv2b_d32.S" diff --git a/src/stub/src/arm64-linux.elf-so_entry.S b/src/stub/src/arm64-linux.elf-so_entry.S index dca56118..85cf27b5 100644 --- a/src/stub/src/arm64-linux.elf-so_entry.S +++ b/src/stub/src/arm64-linux.elf-so_entry.S @@ -188,7 +188,7 @@ f_decompress: // only one de-compressor; build 'eof' return #undef DAISY_CHAIN -// use of mmap() forces implcit cache sync +// use of mmap() forces implicit cache sync #define NO_SYNC_CACHE 1 off .req w5 diff --git a/src/stub/src/mips.r3000-expand.S b/src/stub/src/mips.r3000-expand.S index 269720c5..e7ab7d4b 100644 --- a/src/stub/src/mips.r3000-expand.S +++ b/src/stub/src/mips.r3000-expand.S @@ -140,7 +140,7 @@ eof_n2b: .globl eof_n2b lw tmp,1*NBPW(sp) # orig dst lw ldst,2*NBPW(sp) subu tmp,dst,tmp - sw tmp,0(ldst) # actual len genereated + sw tmp,0(ldst) # actual len generated lw tmp,0*NBPW(sp) # &b_info nop diff --git a/src/stub/src/mipsel.r3000-linux.elf-entry.S b/src/stub/src/mipsel.r3000-linux.elf-entry.S index 5be1afea..603e4c70 100644 --- a/src/stub/src/mipsel.r3000-linux.elf-entry.S +++ b/src/stub/src/mipsel.r3000-linux.elf-entry.S @@ -251,7 +251,7 @@ HALT: move a2,$r_szuf # .sz_unc move a1,sp move a0,$r_mfd - li v0,__NR_write; syscall; bnez a3,HALT // faliure + li v0,__NR_write; syscall; bnez a3,HALT // failure move sp,fp # Map de-compressed stub diff --git a/src/stub/src/upxfd_android.c b/src/stub/src/upxfd_android.c index b0356f97..fed3ed10 100644 --- a/src/stub/src/upxfd_android.c +++ b/src/stub/src/upxfd_android.c @@ -136,11 +136,11 @@ extern int fstatat(int dirfd, const char *restrict pathname, #define ENOENT 2 /* no such name */ #define EACCES 13 /* permission denied */ -#define EINVAL 22 /* invalid arguemnt */ +#define EINVAL 22 /* invalid argument */ #define ENOSPC 28 /* no space left on device */ #define ENOSYS 38 /* no such system call */ -// ANDROID_TEST: Set to 1 for testing Android implmentation using Linux on +// ANDROID_TEST: Set to 1 for testing Android implementation using Linux on // Raspberry Pi (arm32, perhaps running on actual arm64); else set to 0. #define ANDROID_TEST 0