mips memfd_create() and syscall error handling

https://github.com/upx/upx/issues/895
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	modified:   stub/src/mipsel.r3000-linux.elf-entry.S
	modified:   stub/src/mipsel.r3000-linux.elf-fold.S
           plus generated .h .dump .map
This commit is contained in:
John Reiser
2025-03-13 08:07:26 -07:00
parent c2da21ba4e
commit 6f650ca16f
11 changed files with 2283 additions and 2325 deletions
+1 -3
View File
@@ -8,8 +8,6 @@ SYMBOL TABLE:
00000000 l d ELFMAINX 0 ELFMAINX
00000000 l d ELFMAINZ 0 ELFMAINZ
00000000 g O ELFMAINX 0 _start
000000e8 g O ELFMAINZ 0 memfd_create
000000f8 g O ELFMAINZ 0 ftruncate
00000000 *UND* 0 O_BINFO
RELOCATION RECORDS FOR [ELFMAINX]:
@@ -18,5 +16,5 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
00000068 R_MIPS_PC16 ELFMAINX
00000080 R_MIPS_PC16 ELFMAINX
00000158 R_MIPS_32 O_BINFO
+19 -21
View File
@@ -16,35 +16,33 @@ Linker script and memory map
0x0000000000000010 get4unal
0x0000000000000128 close
SYSCALLS 0x0000000000000000 0x1c4
SYSCALLS 0x0000000000000000 0x1c4 tmp/mips.r3000-linux.elf-fold.o
0x0000000000000184 munmap
0x0000000000000154 getpid
SYSCALLS 0x0000000000000000 0x1b4
SYSCALLS 0x0000000000000000 0x1b4 tmp/mips.r3000-linux.elf-fold.o
0x0000000000000174 munmap
0x0000000000000144 getpid
0x0000000000000094 memcpy
0x00000000000001a4 readlink
0x0000000000000194 readlink
0x0000000000000034 Psync
0x00000000000000bc mempcpy
0x000000000000014c ftruncate
0x000000000000015c lseek
0x000000000000013c ftruncate
0x000000000000014c lseek
0x00000000000000f0 mmap
0x00000000000000e4 mmap_privanon
0x00000000000001ac uname
0x00000000000001bc write
0x0000000000000130 sysret_incl
0x0000000000000164 memfd_create
0x000000000000019c read
0x00000000000001b4 unlink
0x000000000000019c uname
0x00000000000001ac write
0x0000000000000154 memfd_create
0x000000000000018c read
0x00000000000001a4 unlink
0x0000000000000074 memset
0x000000000000017c msync
0x000000000000016c msync
0x0000000000000068 my_bkpt
0x0000000000000000 Pprotect
0x000000000000018c stat
0x000000000000013c exit
0x0000000000000144 brk
0x000000000000012c sysgo_incl
0x0000000000000194 open
0x0000000000000174 mprotect
0x000000000000016c mkdir
0x000000000000017c stat
0x000000000000012c exit
0x0000000000000134 brk
0x0000000000000184 open
0x0000000000000164 mprotect
0x000000000000015c mkdir
HUMF_A 0x0000000000000000 0x8
HUMF_A 0x0000000000000000 0x8 tmp/mips.r3000-linux.elf-fold.o
+1 -3
View File
@@ -8,8 +8,6 @@ SYMBOL TABLE:
00000000 l d ELFMAINX 0 ELFMAINX
00000000 l d ELFMAINZ 0 ELFMAINZ
00000000 g O ELFMAINX 0 _start
000000e8 g O ELFMAINZ 0 memfd_create
000000f8 g O ELFMAINZ 0 ftruncate
00000000 *UND* 0 O_BINFO
RELOCATION RECORDS FOR [ELFMAINX]:
@@ -18,5 +16,5 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
00000068 R_MIPS_PC16 ELFMAINX
00000080 R_MIPS_PC16 ELFMAINX
00000158 R_MIPS_32 O_BINFO
+19 -21
View File
@@ -16,35 +16,33 @@ Linker script and memory map
0x0000000000000010 get4unal
0x0000000000000128 close
SYSCALLS 0x0000000000000000 0x1c4
SYSCALLS 0x0000000000000000 0x1c4 tmp/mipsel.r3000-linux.elf-fold.o
0x0000000000000184 munmap
0x0000000000000154 getpid
SYSCALLS 0x0000000000000000 0x1b4
SYSCALLS 0x0000000000000000 0x1b4 tmp/mipsel.r3000-linux.elf-fold.o
0x0000000000000174 munmap
0x0000000000000144 getpid
0x0000000000000094 memcpy
0x00000000000001a4 readlink
0x0000000000000194 readlink
0x0000000000000034 Psync
0x00000000000000bc mempcpy
0x000000000000014c ftruncate
0x000000000000015c lseek
0x000000000000013c ftruncate
0x000000000000014c lseek
0x00000000000000f0 mmap
0x00000000000000e4 mmap_privanon
0x00000000000001ac uname
0x00000000000001bc write
0x0000000000000130 sysret_incl
0x0000000000000164 memfd_create
0x000000000000019c read
0x00000000000001b4 unlink
0x000000000000019c uname
0x00000000000001ac write
0x0000000000000154 memfd_create
0x000000000000018c read
0x00000000000001a4 unlink
0x0000000000000074 memset
0x000000000000017c msync
0x000000000000016c msync
0x0000000000000068 my_bkpt
0x0000000000000000 Pprotect
0x000000000000018c stat
0x000000000000013c exit
0x0000000000000144 brk
0x000000000000012c sysgo_incl
0x0000000000000194 open
0x0000000000000174 mprotect
0x000000000000016c mkdir
0x000000000000017c stat
0x000000000000012c exit
0x0000000000000134 brk
0x0000000000000184 open
0x0000000000000164 mprotect
0x000000000000015c mkdir
HUMF_A 0x0000000000000000 0x8
HUMF_A 0x0000000000000000 0x8 tmp/mipsel.r3000-linux.elf-fold.o