More Control Flow Integrity (Intel)

More ENDBRxx for CALL *%RDX for 'getbit'.
amd64: LEA xxx(%rip),%reg and STRCON section,
    instead of CALL; .asciz "..."; POP %reg
(Not for PE due to WINDOWS_BACK binary compatibility.)
i386 string constants still use call-.asciz-pop because no (%rip)
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/amd64-linux.elf-main2.c
	modified:   stub/src/amd64-linux.elf-so_entry.S
	modified:   stub/src/amd64-linux.shlib-init.S
	modified:   stub/src/amd64-win64.pe.S
	modified:   stub/src/i386-linux.elf-entry.S
	modified:   stub/src/i386-linux.elf-so_entry.S
	modified:   stub/src/upxfd_android.c
           plus generated *.h *.map *.dump
This commit is contained in:
John Reiser
2024-09-20 13:41:43 -07:00
parent d55fdf2205
commit 3403b87cb7
19 changed files with 2258 additions and 2223 deletions
+3 -3
View File
@@ -2,8 +2,8 @@ file format elf64-x86-64
Sections:
Idx Name Size VMA LMA File off Algn Flags
0 ELFMAINX 0fd 0 0 040 2**0 CONTENTS
1 ELFMAINZ 06 0 0 013d 2**0 CONTENTS
0 ELFMAINX 0101 0 0 040 2**0 CONTENTS
1 ELFMAINZ 06 0 0 0141 2**0 CONTENTS
SYMBOL TABLE:
0000000000000000 l d ELFMAINX 0 ELFMAINX
0000000000000000 l ELFMAINX 0 _start
@@ -15,4 +15,4 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
0000000000000002 R_X86_64_PC32 ELFMAINX+0x0000000000000019
0000000000000002 R_X86_64_PC32 ELFMAINX+0x000000000000001d