Spend 8 instructions to avoid modifying [0xf7000000, +) under qemu-arm.

modified:   src/arm.v4a-linux.elf-entry.S
	modified:   src/arm.v4a-linux.elf-fold.S

	plus arm*.h and tmp/arm*.{dump,map}
This commit is contained in:
John Reiser
2017-09-20 13:31:38 -07:00
parent 08627e9df5
commit ede570be21
14 changed files with 2544 additions and 2540 deletions
@@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn Flags
8 LZMA_DEC10 00000478 00000000 00000000 00000d48 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 000011c0 2**0 CONTENTS, READONLY
10 ELFMAINY 00000036 00000000 00000000 000011c0 2**0 CONTENTS, READONLY
11 ELFMAINZ 000000cc 00000000 00000000 000011f6 2**0 CONTENTS, RELOC, READONLY
11 ELFMAINZ 000000ec 00000000 00000000 000011f6 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D
@@ -38,7 +38,7 @@ SYMBOL TABLE:
00000000 g LZMA_DEC10 00000000 LzmaDecode
00000000 g ELFMAINY 00000000 end_decompress
00000000 *UND* 00000000 O_BINFO
000000cc g ELFMAINZ 00000000 cpr0
000000ec g ELFMAINZ 00000000 cpr0
RELOCATION RECORDS FOR [ELFMAINX]:
OFFSET TYPE VALUE
@@ -255,7 +255,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
00000070 R_ARM_PC24 ELFMAINY
00000090 R_ARM_PC24 ELFMAINZ
000000c4 R_ARM_PC24 ELFMAINZ
000000c8 R_ARM_ABS32 O_BINFO
00000074 R_ARM_PC24 ELFMAINY
00000094 R_ARM_PC24 ELFMAINZ
000000e4 R_ARM_PC24 ELFMAINZ
000000e8 R_ARM_ABS32 O_BINFO
+27 -27
View File
@@ -9,38 +9,38 @@ Linker script and memory map
TARGET(elf32-littlearm)
0x0000000000008080 . = ((0x8000 + SIZEOF_HEADERS) + 0xc)
.text 0x0000000000008080 0xa14
.text 0x0000000000008080 0x9f8
*(.text)
.text 0x0000000000008080 0x324 tmp/arm.v4a-linux.elf-fold.o
0x00000000000082e8 munmap
0x0000000000008328 get_sys_munmap
0x00000000000082d0 getpid
0x00000000000082e0 readlink
0x0000000000008304 mmap
0x00000000000082f8 __clear_cache
0x0000000000008330 mmap_privanon
0x00000000000082b0 write
0x00000000000082a8 read
0x00000000000082c8 unlink
0x000000000000829c my_bkpt
0x00000000000082a4 exit
0x00000000000082d8 brk
0x00000000000082b8 open
0x0000000000008348 div10
0x00000000000082f0 mprotect
0x00000000000082c0 close
.text 0x00000000000083a4 0x6f0 tmp/arm.v4a-linux.elf-main.o
0x00000000000083c4 get_page_mask
0x0000000000008960 upx_main
.text 0x0000000000008080 0x308 tmp/arm.v4a-linux.elf-fold.o
0x00000000000082dc munmap
0x0000000000008310 get_sys_munmap
0x00000000000082c4 getpid
0x00000000000082d4 readlink
0x00000000000082f8 mmap
0x00000000000082ec __clear_cache
0x0000000000008318 mmap_privanon
0x00000000000082a4 write
0x000000000000829c read
0x00000000000082bc unlink
0x0000000000008290 my_bkpt
0x0000000000008298 exit
0x00000000000082cc brk
0x00000000000082ac open
0x000000000000832c div10
0x00000000000082e4 mprotect
0x00000000000082b4 close
.text 0x0000000000008388 0x6f0 tmp/arm.v4a-linux.elf-main.o
0x00000000000083a8 get_page_mask
0x0000000000008944 upx_main
*(.data)
.data 0x0000000000008a94 0x0 tmp/arm.v4a-linux.elf-fold.o
.data 0x0000000000008a94 0x0 tmp/arm.v4a-linux.elf-main.o
.data 0x0000000000008a78 0x0 tmp/arm.v4a-linux.elf-fold.o
.data 0x0000000000008a78 0x0 tmp/arm.v4a-linux.elf-main.o
.data
.bss 0x0000000000008a94 0x0
.bss 0x0000000000008a94 0x0 tmp/arm.v4a-linux.elf-fold.o
.bss 0x0000000000008a94 0x0 tmp/arm.v4a-linux.elf-main.o
.bss 0x0000000000008a78 0x0
.bss 0x0000000000008a78 0x0 tmp/arm.v4a-linux.elf-fold.o
.bss 0x0000000000008a78 0x0 tmp/arm.v4a-linux.elf-main.o
LOAD tmp/arm.v4a-linux.elf-fold.o
LOAD tmp/arm.v4a-linux.elf-main.o
OUTPUT(tmp/arm.v4a-linux.elf-fold.bin elf32-littlearm)
@@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn Flags
8 LZMA_DEC10 00000478 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 00001200 2**0 CONTENTS, READONLY
10 ELFMAINY 0000003e 00000000 00000000 00001200 2**0 CONTENTS, READONLY
11 ELFMAINZ 000000d0 00000000 00000000 0000123e 2**0 CONTENTS, RELOC, READONLY
11 ELFMAINZ 000000f0 00000000 00000000 0000123e 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D
@@ -38,7 +38,7 @@ SYMBOL TABLE:
00000000 g LZMA_DEC10 00000000 LzmaDecode
00000000 g ELFMAINY 00000000 end_decompress
00000000 *UND* 00000000 O_BINFO
000000d0 g ELFMAINZ 00000000 cpr0
000000f0 g ELFMAINZ 00000000 cpr0
RELOCATION RECORDS FOR [ELFMAINX]:
OFFSET TYPE VALUE
@@ -255,7 +255,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
00000074 R_ARM_PC24 ELFMAINY
00000094 R_ARM_PC24 ELFMAINZ
000000c8 R_ARM_PC24 ELFMAINZ
000000cc R_ARM_ABS32 O_BINFO
00000078 R_ARM_PC24 ELFMAINY
00000098 R_ARM_PC24 ELFMAINZ
000000e8 R_ARM_PC24 ELFMAINZ
000000ec R_ARM_ABS32 O_BINFO
+27 -27
View File
@@ -9,38 +9,38 @@ Linker script and memory map
TARGET(elf32-littlearm)
0x0000000000008080 . = ((0x8000 + SIZEOF_HEADERS) + 0xc)
.text 0x0000000000008080 0xab0
.text 0x0000000000008080 0xa94
*(.text)
.text 0x0000000000008080 0x3c4 tmp/arm.v5a-linux.elf-fold.o
0x0000000000008354 munmap
0x00000000000083c8 get_sys_munmap
0x0000000000008318 getpid
0x0000000000008340 readlink
0x0000000000008398 mmap
0x000000000000837c __clear_cache
0x00000000000083d0 mmap_privanon
0x00000000000082c8 write
0x00000000000082b4 read
0x0000000000008304 unlink
0x000000000000829c my_bkpt
0x00000000000082a4 exit
0x000000000000832c brk
0x00000000000082dc open
0x00000000000083e8 div10
0x0000000000008368 mprotect
0x00000000000082f0 close
.text 0x0000000000008444 0x6ec tmp/armel-linux.elf-main.o
0x0000000000008464 get_page_mask
0x00000000000089fc upx_main
.text 0x0000000000008080 0x3a8 tmp/arm.v5a-linux.elf-fold.o
0x0000000000008348 munmap
0x00000000000083b0 get_sys_munmap
0x000000000000830c getpid
0x0000000000008334 readlink
0x000000000000838c mmap
0x0000000000008370 __clear_cache
0x00000000000083b8 mmap_privanon
0x00000000000082bc write
0x00000000000082a8 read
0x00000000000082f8 unlink
0x0000000000008290 my_bkpt
0x0000000000008298 exit
0x0000000000008320 brk
0x00000000000082d0 open
0x00000000000083cc div10
0x000000000000835c mprotect
0x00000000000082e4 close
.text 0x0000000000008428 0x6ec tmp/armel-linux.elf-main.o
0x0000000000008448 get_page_mask
0x00000000000089e0 upx_main
*(.data)
.data 0x0000000000008b30 0x0 tmp/arm.v5a-linux.elf-fold.o
.data 0x0000000000008b30 0x0 tmp/armel-linux.elf-main.o
.data 0x0000000000008b14 0x0 tmp/arm.v5a-linux.elf-fold.o
.data 0x0000000000008b14 0x0 tmp/armel-linux.elf-main.o
.data
.bss 0x0000000000008b30 0x0
.bss 0x0000000000008b30 0x0 tmp/arm.v5a-linux.elf-fold.o
.bss 0x0000000000008b30 0x0 tmp/armel-linux.elf-main.o
.bss 0x0000000000008b14 0x0
.bss 0x0000000000008b14 0x0 tmp/arm.v5a-linux.elf-fold.o
.bss 0x0000000000008b14 0x0 tmp/armel-linux.elf-main.o
LOAD tmp/arm.v5a-linux.elf-fold.o
LOAD tmp/armel-linux.elf-main.o
OUTPUT(tmp/arm.v5a-linux.elf-fold.bin elf32-littlearm)
@@ -13,7 +13,7 @@ Idx Name Size VMA LMA File off Algn Flags
8 LZMA_DEC10 00000478 00000000 00000000 00000d48 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 000011c0 2**0 CONTENTS, READONLY
10 ELFMAINY 00000036 00000000 00000000 000011c0 2**0 CONTENTS, READONLY
11 ELFMAINZ 000000cc 00000000 00000000 000011f6 2**0 CONTENTS, RELOC, READONLY
11 ELFMAINZ 000000ec 00000000 00000000 000011f6 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D
@@ -38,7 +38,7 @@ SYMBOL TABLE:
00000000 g LZMA_DEC10 00000000 LzmaDecode
00000000 g ELFMAINY 00000000 end_decompress
00000000 *UND* 00000000 O_BINFO
000000cc g ELFMAINZ 00000000 cpr0
000000ec g ELFMAINZ 00000000 cpr0
RELOCATION RECORDS FOR [ELFMAINX]:
OFFSET TYPE VALUE
@@ -255,7 +255,7 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [ELFMAINZ]:
OFFSET TYPE VALUE
00000070 R_ARM_PC24 ELFMAINY
00000090 R_ARM_PC24 ELFMAINZ
000000c4 R_ARM_PC24 ELFMAINZ
000000c8 R_ARM_ABS32 O_BINFO
00000074 R_ARM_PC24 ELFMAINY
00000094 R_ARM_PC24 ELFMAINZ
000000e4 R_ARM_PC24 ELFMAINZ
000000e8 R_ARM_ABS32 O_BINFO
+27 -27
View File
@@ -9,38 +9,38 @@ Linker script and memory map
TARGET(elf32-bigarm)
0x0000000000008080 . = ((0x8000 + SIZEOF_HEADERS) + 0xc)
.text 0x0000000000008080 0xa14
.text 0x0000000000008080 0x9f8
*(.text)
.text 0x0000000000008080 0x324 tmp/armeb.v4a-linux.elf-fold.o
0x00000000000082e8 munmap
0x0000000000008328 get_sys_munmap
0x00000000000082d0 getpid
0x00000000000082e0 readlink
0x0000000000008304 mmap
0x00000000000082f8 __clear_cache
0x0000000000008330 mmap_privanon
0x00000000000082b0 write
0x00000000000082a8 read
0x00000000000082c8 unlink
0x000000000000829c my_bkpt
0x00000000000082a4 exit
0x00000000000082d8 brk
0x00000000000082b8 open
0x0000000000008348 div10
0x00000000000082f0 mprotect
0x00000000000082c0 close
.text 0x00000000000083a4 0x6f0 tmp/armeb.v4a-linux.elf-main.o
0x00000000000083c4 get_page_mask
0x0000000000008960 upx_main
.text 0x0000000000008080 0x308 tmp/armeb.v4a-linux.elf-fold.o
0x00000000000082dc munmap
0x0000000000008310 get_sys_munmap
0x00000000000082c4 getpid
0x00000000000082d4 readlink
0x00000000000082f8 mmap
0x00000000000082ec __clear_cache
0x0000000000008318 mmap_privanon
0x00000000000082a4 write
0x000000000000829c read
0x00000000000082bc unlink
0x0000000000008290 my_bkpt
0x0000000000008298 exit
0x00000000000082cc brk
0x00000000000082ac open
0x000000000000832c div10
0x00000000000082e4 mprotect
0x00000000000082b4 close
.text 0x0000000000008388 0x6f0 tmp/armeb.v4a-linux.elf-main.o
0x00000000000083a8 get_page_mask
0x0000000000008944 upx_main
*(.data)
.data 0x0000000000008a94 0x0 tmp/armeb.v4a-linux.elf-fold.o
.data 0x0000000000008a94 0x0 tmp/armeb.v4a-linux.elf-main.o
.data 0x0000000000008a78 0x0 tmp/armeb.v4a-linux.elf-fold.o
.data 0x0000000000008a78 0x0 tmp/armeb.v4a-linux.elf-main.o
.data
.bss 0x0000000000008a94 0x0
.bss 0x0000000000008a94 0x0 tmp/armeb.v4a-linux.elf-fold.o
.bss 0x0000000000008a94 0x0 tmp/armeb.v4a-linux.elf-main.o
.bss 0x0000000000008a78 0x0
.bss 0x0000000000008a78 0x0 tmp/armeb.v4a-linux.elf-fold.o
.bss 0x0000000000008a78 0x0 tmp/armeb.v4a-linux.elf-main.o
LOAD tmp/armeb.v4a-linux.elf-fold.o
LOAD tmp/armeb.v4a-linux.elf-main.o
OUTPUT(tmp/armeb.v4a-linux.elf-fold.bin elf32-bigarm)