Elf propagates NX via PT_GNU_STACK (except MIPS stub is too difficult for now)

https://github.com/upx/upx/issues/81
	modified:   ../.github/travis_testsuite_1.sh
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
	modified:   stub/amd64-linux.elf-entry.h
	modified:   stub/i386-linux.elf-fold.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/powerpc64le-linux.elf-fold.h
	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/i386-linux.elf-fold.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   stub/tmp/amd64-linux.elf-entry.bin.dump
	modified:   stub/tmp/i386-linux.elf-fold.map
	modified:   stub/tmp/powerpc-linux.elf-fold.map
	modified:   stub/tmp/powerpc64le-linux.elf-fold.map
This commit is contained in:
John Reiser
2017-04-03 20:11:08 -07:00
parent ef97af71e3
commit a59005e836
16 changed files with 889 additions and 832 deletions
+39 -39
View File
@@ -9,58 +9,58 @@ Linker script and memory map
TARGET(elf64-powerpcle)
0x00000000001000bc . = ((0x100000 + SIZEOF_HEADERS) + 0xc)
.text 0x00000000001000bc 0x810
.text 0x00000000001000bc 0x81c
*(.text)
.text 0x00000000001000bc 0x1a4 tmp/powerpc64le-linux.elf-fold.o
0x0000000000100214 mmap
0x0000000000100228 exit
0x0000000000100230 read
0x0000000000100238 open
0x0000000000100240 close
0x0000000000100248 mprotect
0x0000000000100250 munmap
0x0000000000100258 brk
.text 0x0000000000100260 0x66c tmp/powerpc64le-linux.elf-main.o
.text 0x00000000001000bc 0x1b0 tmp/powerpc64le-linux.elf-fold.o
0x0000000000100220 mmap
0x0000000000100234 exit
0x000000000010023c read
0x0000000000100244 open
0x000000000010024c close
0x0000000000100254 mprotect
0x000000000010025c munmap
0x0000000000100264 brk
.text 0x000000000010026c 0x66c tmp/powerpc64le-linux.elf-main.o
*(.data)
.data 0x00000000001008cc 0x0 tmp/powerpc64le-linux.elf-fold.o
.data 0x00000000001008cc 0x0 tmp/powerpc64le-linux.elf-main.o
.data 0x00000000001008d8 0x0 tmp/powerpc64le-linux.elf-fold.o
.data 0x00000000001008d8 0x0 tmp/powerpc64le-linux.elf-main.o
.sfpr 0x00000000001008cc 0xa4
.sfpr 0x00000000001008cc 0xa4 linker stubs
0x00000000001008cc _savegpr0_14
0x0000000000100900 _savegpr0_27
0x0000000000100904 _savegpr0_28
0x000000000010091c _restgpr0_14
0x0000000000100950 _restgpr0_27
0x0000000000100954 _restgpr0_28
.sfpr 0x00000000001008d8 0xa4
.sfpr 0x00000000001008d8 0xa4 linker stubs
0x00000000001008d8 _savegpr0_14
0x000000000010090c _savegpr0_27
0x0000000000100910 _savegpr0_28
0x0000000000100928 _restgpr0_14
0x000000000010095c _restgpr0_27
0x0000000000100960 _restgpr0_28
.glink 0x0000000000100970 0x0
.glink 0x0000000000100970 0x0 linker stubs
.glink 0x0000000000100980 0x0
.glink 0x0000000000100980 0x0 linker stubs
.eh_frame 0x0000000000100970 0x0
.eh_frame 0x0000000000100970 0x0 linker stubs
.eh_frame 0x000000000010097c 0x0
.eh_frame 0x000000000010097c 0x0 linker stubs
.rela.dyn 0x0000000000100970 0x0
.rela.iplt 0x0000000000100970 0x0 linker stubs
.rela.dyn 0x0000000000100980 0x0
.rela.iplt 0x0000000000100980 0x0 linker stubs
.data
LOAD tmp/powerpc64le-linux.elf-fold.o
LOAD tmp/powerpc64le-linux.elf-main.o
OUTPUT(tmp/powerpc64le-linux.elf-fold.bin elf64-powerpcle)
.branch_lt 0x0000000000100970 0x0
.branch_lt 0x0000000000100970 0x0 linker stubs
.branch_lt 0x0000000000100980 0x0
.branch_lt 0x0000000000100980 0x0 linker stubs
.toc 0x0000000000100970 0x0
.toc 0x0000000000100970 0x0 tmp/powerpc64le-linux.elf-main.o
.toc 0x0000000000100980 0x0
.toc 0x0000000000100980 0x0 tmp/powerpc64le-linux.elf-main.o
.opd 0x0000000000100970 0x58
.opd 0x0000000000100970 0x58 tmp/powerpc64le-linux.elf-main.o
0x00000000001009b0 upx_main
.opd 0x0000000000100980 0x58
.opd 0x0000000000100980 0x58 tmp/powerpc64le-linux.elf-main.o
0x00000000001009c0 upx_main
.iplt 0x00000000001009c8 0x0
.iplt 0x00000000001009c8 0x0 linker stubs
.iplt 0x00000000001009d8 0x0
.iplt 0x00000000001009d8 0x0 linker stubs
.bss 0x00000000001009c8 0x0
.bss 0x00000000001009c8 0x0 tmp/powerpc64le-linux.elf-fold.o
.bss 0x00000000001009c8 0x0 tmp/powerpc64le-linux.elf-main.o
.bss 0x00000000001009d8 0x0
.bss 0x00000000001009d8 0x0 tmp/powerpc64le-linux.elf-fold.o
.bss 0x00000000001009d8 0x0 tmp/powerpc64le-linux.elf-main.o