PowerPC64 stub: on syscall, real Linux trashes r13 and below

(except r1, r2, and input args!) So, r12 .e_entry for musl
must copy from a saved register.  [qemu-ppc64 doesn't trash registers!]
	modified:   ../.github/travis_testsuite_1.sh
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-main.c
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	also .h  .fold.map
This commit is contained in:
John Reiser
2017-10-27 20:07:32 -07:00
parent bb8e607442
commit 0430e7931e
12 changed files with 621 additions and 610 deletions
+14 -14
View File
@@ -8,7 +8,7 @@ Linker script and memory map
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0x934
.text 0x00000000001000bc 0x920
*(.text)
.text 0x00000000001000bc 0x238 tmp/arm64-linux.elf-fold.o
0x0000000000100228 my_bkpt
@@ -26,26 +26,26 @@ Linker script and memory map
0x00000000001002bc readlink
0x00000000001002c4 open
0x00000000001002e0 __clear_cache
.text 0x00000000001002f4 0x6fc tmp/arm64-linux.elf-main.o
0x0000000000100888 upx_main
.text 0x00000000001002f4 0x6e8 tmp/arm64-linux.elf-main.o
0x0000000000100874 upx_main
*(.data)
.data 0x00000000001009f0 0x0 tmp/arm64-linux.elf-fold.o
.data 0x00000000001009f0 0x0 tmp/arm64-linux.elf-main.o
.data 0x00000000001009dc 0x0 tmp/arm64-linux.elf-fold.o
.data 0x00000000001009dc 0x0 tmp/arm64-linux.elf-main.o
.iplt 0x00000000001009f0 0x0
.iplt 0x00000000001009f0 0x0 tmp/arm64-linux.elf-fold.o
.iplt 0x00000000001009dc 0x0
.iplt 0x00000000001009dc 0x0 tmp/arm64-linux.elf-fold.o
.rela.dyn 0x00000000001009f0 0x0
.rela.iplt 0x00000000001009f0 0x0 tmp/arm64-linux.elf-fold.o
.rela.dyn 0x00000000001009e0 0x0
.rela.iplt 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
.data
LOAD tmp/arm64-linux.elf-fold.o
LOAD tmp/arm64-linux.elf-main.o
OUTPUT(tmp/arm64-linux.elf-fold.bin elf64-littleaarch64)
.igot.plt 0x00000000001009f0 0x0
.igot.plt 0x00000000001009f0 0x0 tmp/arm64-linux.elf-fold.o
.igot.plt 0x00000000001009e0 0x0
.igot.plt 0x00000000001009e0 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x00000000001009f0 0x0
.bss 0x00000000001009f0 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x00000000001009f0 0x0 tmp/arm64-linux.elf-main.o
.bss 0x00000000001009dc 0x0
.bss 0x00000000001009dc 0x0 tmp/arm64-linux.elf-fold.o
.bss 0x00000000001009dc 0x0 tmp/arm64-linux.elf-main.o