Mach-o stubs turn off DEBUG

Branch jreiser-macho has DEBUG 1
	modified:   stub/src/amd64-darwin.macho-main.c
	modified:   stub/src/arm.v5a-darwin.macho-entry.S
	modified:   stub/src/arm.v5a-darwin.macho-fold.S
	modified:   stub/src/arm64-darwin.macho-entry.S
	modified:   stub/src/arm64-darwin.macho-fold.S
This commit is contained in:
John Reiser
2017-12-27 10:23:19 -08:00
parent 35427f998e
commit c384d224c0
13 changed files with 1847 additions and 2253 deletions
@@ -2,18 +2,18 @@ file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn Flags
0 MACHMAINX 00000018 00000000 00000000 00000034 2**0 CONTENTS, RELOC, READONLY
1 NRV_HEAD 00000000 00000000 00000000 0000004c 2**0 CONTENTS, READONLY
2 NRV2E 00000144 00000000 00000000 0000004c 2**0 CONTENTS, RELOC, READONLY
3 NRV2D 00000130 00000000 00000000 00000190 2**0 CONTENTS, RELOC, READONLY
4 NRV2B 000000f4 00000000 00000000 000002c0 2**0 CONTENTS, RELOC, READONLY
5 NRV_TAIL 00000000 00000000 00000000 000003b4 2**0 CONTENTS, READONLY
6 LZMA_ELF00 000000bc 00000000 00000000 000003b4 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000470 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000da8 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 00001220 2**0 CONTENTS, READONLY
10 MACHMAINY 00000000 00000000 00000000 00001220 2**0 CONTENTS, READONLY
11 MACHMAINZ 0000025c 00000000 00000000 00001220 2**0 CONTENTS, RELOC, READONLY
0 MACHMAINX 0000000c 00000000 00000000 00000034 2**0 CONTENTS, RELOC, READONLY
1 NRV_HEAD 00000000 00000000 00000000 00000040 2**0 CONTENTS, READONLY
2 NRV2E 00000144 00000000 00000000 00000040 2**0 CONTENTS, RELOC, READONLY
3 NRV2D 00000130 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY
4 NRV2B 000000f4 00000000 00000000 000002b4 2**0 CONTENTS, RELOC, READONLY
5 NRV_TAIL 00000000 00000000 00000000 000003a8 2**0 CONTENTS, READONLY
6 LZMA_ELF00 000000bc 00000000 00000000 000003a8 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000938 00000000 00000000 00000464 2**0 CONTENTS, RELOC, READONLY
8 LZMA_DEC10 00000478 00000000 00000000 00000d9c 2**0 CONTENTS, RELOC, READONLY
9 LZMA_DEC30 00000000 00000000 00000000 00001214 2**0 CONTENTS, READONLY
10 MACHMAINY 00000000 00000000 00000000 00001214 2**0 CONTENTS, READONLY
11 MACHMAINZ 00000184 00000000 00000000 00001214 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
00000000 l d NRV2E 00000000 NRV2E
00000000 l d NRV2D 00000000 NRV2D
@@ -37,7 +37,6 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [MACHMAINX]:
OFFSET TYPE VALUE
00000008 R_ARM_PC24 MACHMAINZ
00000014 R_ARM_PC24 MACHMAINZ
RELOCATION RECORDS FOR [NRV2E]:
OFFSET TYPE VALUE
@@ -246,18 +245,9 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [MACHMAINZ]:
OFFSET TYPE VALUE
00000008 R_ARM_PC24 MACHMAINZ
00000084 R_ARM_PC24 MACHMAINZ
000000e0 R_ARM_PC24 MACHMAINZ
0000010c R_ARM_PC24 MACHMAINZ
00000118 R_ARM_PC24 MACHMAINZ
00000124 R_ARM_PC24 MACHMAINZ
0000013c R_ARM_PC24 MACHMAINZ
00000144 R_ARM_PC24 MACHMAINZ
00000154 R_ARM_PC24 MACHMAINZ
0000015c R_ARM_PC24 MACHMAINZ
00000164 R_ARM_PC24 MACHMAINZ
000001ac R_ARM_PC24 MACHMAINZ
000001e4 R_ARM_PC24 MACHMAINZ
000001f0 R_ARM_PC24 MACHMAINZ
000001fc R_ARM_PC24 MACHMAINZ
00000214 R_ARM_PC24 MACHMAINZ
0000021c R_ARM_PC24 MACHMAINZ
00000258 R_ARM_PC24 MACHMAINZ
00000180 R_ARM_PC24 MACHMAINZ
+49 -49
View File
@@ -72,35 +72,35 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
.plt
*(.plt)
.text 0x0000000008048000 0x11c4
.text 0x0000000008048000 0x8c8
*(.text .stub .text.* .gnu.linkonce.t.*)
.text 0x0000000008048000 0x300 tmp/arm.v5a-darwin.macho-fold.o
0x00000000080481fc munmap
0x000000000804826c bswap
0x000000000804829c __udivsi3
0x0000000008048224 mmap
0x00000000080481ac write
.text 0x0000000008048000 0x22c tmp/arm.v5a-darwin.macho-fold.o
0x0000000008048128 munmap
0x0000000008048198 bswap
0x00000000080481c8 __udivsi3
0x0000000008048150 mmap
0x00000000080480d8 write
0x0000000008048000 _start
0x0000000008048198 read
0x0000000008048184 spin
0x000000000804824c pread
0x0000000008048188 exit
0x00000000080481e8 brk
0x00000000080481c0 open
0x00000000080482a4 div10
0x0000000008048210 mprotect
0x00000000080481d4 close
.text 0x0000000008048300 0xec4 tmp/arm.v5a-darwin.macho-main.o
0x00000000080488e4 do_xmap
0x0000000008048f1c upx_main
0x00000000080480c4 read
0x00000000080480b0 spin
0x0000000008048178 pread
0x00000000080480b4 exit
0x0000000008048114 brk
0x00000000080480ec open
0x00000000080481d0 div10
0x000000000804813c mprotect
0x0000000008048100 close
.text 0x000000000804822c 0x69c tmp/arm.v5a-darwin.macho-main.o
0x00000000080483e4 do_xmap
0x0000000008048710 upx_main
*(.text.*personality*)
*(.gnu.warning)
.fini
*(.fini)
0x00000000080491c4 PROVIDE (__etext, .)
0x00000000080491c4 PROVIDE (_etext, .)
0x00000000080491c4 PROVIDE (etext, .)
0x00000000080488c8 PROVIDE (__etext, .)
0x00000000080488c8 PROVIDE (_etext, .)
0x00000000080488c8 PROVIDE (etext, .)
.rodata
*(.rodata .rodata.* .gnu.linkonce.r.*)
@@ -116,8 +116,8 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
.gcc_except_table
*(.gcc_except_table .gcc_except_table.*)
0x00000000080491c4 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
0x000000000804a1c4 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000)
0x00000000080488c8 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
0x00000000080498c8 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000)
.eh_frame
*(.eh_frame)
@@ -132,22 +132,22 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
*(.tbss .tbss.* .gnu.linkonce.tb.*)
*(.tcommon)
.preinit_array 0x000000000804a1c4 0x0
0x000000000804a1c4 PROVIDE (__preinit_array_start, .)
.preinit_array 0x00000000080498c8 0x0
0x00000000080498c8 PROVIDE (__preinit_array_start, .)
*(.preinit_array)
0x000000000804a1c4 PROVIDE (__preinit_array_end, .)
0x00000000080498c8 PROVIDE (__preinit_array_end, .)
.init_array 0x000000000804a1c4 0x0
0x000000000804a1c4 PROVIDE (__init_array_start, .)
.init_array 0x00000000080498c8 0x0
0x00000000080498c8 PROVIDE (__init_array_start, .)
*(SORT(.init_array.*))
*(.init_array)
0x000000000804a1c4 PROVIDE (__init_array_end, .)
0x00000000080498c8 PROVIDE (__init_array_end, .)
.fini_array 0x000000000804a1c4 0x0
0x000000000804a1c4 PROVIDE (__fini_array_start, .)
.fini_array 0x00000000080498c8 0x0
0x00000000080498c8 PROVIDE (__fini_array_start, .)
*(.fini_array)
*(SORT(.fini_array.*))
0x000000000804a1c4 PROVIDE (__fini_array_end, .)
0x00000000080498c8 PROVIDE (__fini_array_end, .)
.ctors
*crtbegin*.o(.ctors)
@@ -173,35 +173,35 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
.got
*(.got)
0x000000000804a1c4 . = (. DATA_SEGMENT_RELRO_END 0xc)
0x00000000080498c8 . = (. DATA_SEGMENT_RELRO_END 0xc)
.got.plt
*(.got.plt)
.data 0x000000000804a1c4 0x0
.data 0x00000000080498c8 0x0
*(.data .data.* .gnu.linkonce.d.*)
.data 0x000000000804a1c4 0x0 tmp/arm.v5a-darwin.macho-fold.o
.data 0x000000000804a1c4 0x0 tmp/arm.v5a-darwin.macho-main.o
.data 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-fold.o
.data 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-main.o
*(.gnu.linkonce.d.*personality*)
.data1
*(.data1)
0x000000000804a1c4 _edata = .
0x000000000804a1c4 PROVIDE (edata, .)
0x000000000804a1c4 __bss_start = .
0x00000000080498c8 _edata = .
0x00000000080498c8 PROVIDE (edata, .)
0x00000000080498c8 __bss_start = .
.bss 0x000000000804a1c4 0x0
.bss 0x00000000080498c8 0x0
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
.bss 0x000000000804a1c4 0x0 tmp/arm.v5a-darwin.macho-fold.o
.bss 0x000000000804a1c4 0x0 tmp/arm.v5a-darwin.macho-main.o
.bss 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-fold.o
.bss 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-main.o
*(COMMON)
0x000000000804a1c4 . = ALIGN ((. != 0x0)?0x4:0x1)
0x000000000804a1c4 . = ALIGN (0x4)
0x000000000804a1c4 . = ALIGN (0x4)
0x000000000804a1c4 _end = .
0x000000000804a1c4 PROVIDE (end, .)
0x000000000804a1c4 . = DATA_SEGMENT_END (.)
0x00000000080498c8 . = ALIGN ((. != 0x0)?0x4:0x1)
0x00000000080498c8 . = ALIGN (0x4)
0x00000000080498c8 . = ALIGN (0x4)
0x00000000080498c8 _end = .
0x00000000080498c8 PROVIDE (end, .)
0x00000000080498c8 . = DATA_SEGMENT_END (.)
.stab
*(.stab)
+14 -15
View File
@@ -2,18 +2,18 @@ file format elf64-littleaarch64
Sections:
Idx Name Size VMA LMA File off Algn Flags
0 MACHMAINX 00000018 0000000000000000 0000000000000000 00000040 2**0 CONTENTS, RELOC, READONLY
1 NRV_HEAD 00000000 0000000000000000 0000000000000000 00000058 2**0 CONTENTS, READONLY
2 NRV2E 00000128 0000000000000000 0000000000000000 00000058 2**0 CONTENTS, READONLY
3 NRV2D 0000011c 0000000000000000 0000000000000000 00000180 2**0 CONTENTS, READONLY
4 NRV2B 000000f0 0000000000000000 0000000000000000 0000029c 2**0 CONTENTS, READONLY
5 NRV_TAIL 00000000 0000000000000000 0000000000000000 0000038c 2**0 CONTENTS, READONLY
6 LZMA_ELF00 000000d0 0000000000000000 0000000000000000 0000038c 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000968 0000000000000000 0000000000000000 0000045c 2**0 CONTENTS, READONLY
8 LZMA_DEC10 0000049c 0000000000000000 0000000000000000 00000dc4 2**0 CONTENTS, READONLY
9 LZMA_DEC30 00000000 0000000000000000 0000000000000000 00001260 2**0 CONTENTS, READONLY
10 MACHMAINY 00000000 0000000000000000 0000000000000000 00001260 2**0 CONTENTS, READONLY
11 MACHMAINZ 000002d8 0000000000000000 0000000000000000 00001260 2**0 CONTENTS, RELOC, READONLY
0 MACHMAINX 00000008 0000000000000000 0000000000000000 00000040 2**0 CONTENTS, RELOC, READONLY
1 NRV_HEAD 00000000 0000000000000000 0000000000000000 00000048 2**0 CONTENTS, READONLY
2 NRV2E 00000128 0000000000000000 0000000000000000 00000048 2**0 CONTENTS, READONLY
3 NRV2D 0000011c 0000000000000000 0000000000000000 00000170 2**0 CONTENTS, READONLY
4 NRV2B 000000f0 0000000000000000 0000000000000000 0000028c 2**0 CONTENTS, READONLY
5 NRV_TAIL 00000000 0000000000000000 0000000000000000 0000037c 2**0 CONTENTS, READONLY
6 LZMA_ELF00 000000d0 0000000000000000 0000000000000000 0000037c 2**0 CONTENTS, RELOC, READONLY
7 LZMA_DEC20 00000968 0000000000000000 0000000000000000 0000044c 2**0 CONTENTS, READONLY
8 LZMA_DEC10 0000049c 0000000000000000 0000000000000000 00000db4 2**0 CONTENTS, READONLY
9 LZMA_DEC30 00000000 0000000000000000 0000000000000000 00001250 2**0 CONTENTS, READONLY
10 MACHMAINY 00000000 0000000000000000 0000000000000000 00001250 2**0 CONTENTS, READONLY
11 MACHMAINZ 00000150 0000000000000000 0000000000000000 00001250 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
0000000000000000 l d LZMA_DEC30 0000000000000000 LZMA_DEC30
0000000000000000 l d MACHMAINZ 0000000000000000 MACHMAINZ
@@ -36,8 +36,7 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [MACHMAINX]:
OFFSET TYPE VALUE
000000000000000c R_AARCH64_CALL26 MACHMAINZ+0x00000000000000e8
0000000000000014 R_AARCH64_CALL26 MACHMAINZ+0x0000000000000264
0000000000000004 R_AARCH64_CALL26 MACHMAINZ+0x00000000000000dc
RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE
@@ -45,4 +44,4 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [MACHMAINZ]:
OFFSET TYPE VALUE
00000000000002b0 R_AARCH64_ADR_PREL_LO21 _start-0x0000000000000008
0000000000000128 R_AARCH64_ADR_PREL_LO21 _start-0x0000000000000008
+59 -59
View File
@@ -67,36 +67,36 @@ LOAD tmp/arm64-darwin.macho-main.o
*(.iplt)
.iplt 0x0000000000400080 0x0 tmp/arm64-darwin.macho-fold.o
.text 0x0000000000400078 0x1240
.text 0x0000000000400078 0x7d8
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
.text 0x0000000000400078 0x2d8 tmp/arm64-darwin.macho-fold.o
.text 0x0000000000400078 0x158 tmp/arm64-darwin.macho-fold.o
0x0000000000400078 _start
0x00000000004002ac spin
0x00000000004002b0 exit
0x00000000004002b8 read
0x00000000004002c4 write
0x00000000004002d0 open
0x00000000004002dc close
0x00000000004002e8 brk
0x00000000004002f4 munmap
0x0000000000400300 mprotect
0x000000000040030c mmap
0x0000000000400318 pread
0x0000000000400324 bswap
.text 0x0000000000400350 0xf68 tmp/arm64-darwin.macho-main.o
0x0000000000400a18 do_xmap
0x0000000000400ff8 upx_main
0x000000000040012c spin
0x0000000000400130 exit
0x0000000000400138 read
0x0000000000400144 write
0x0000000000400150 open
0x000000000040015c close
0x0000000000400168 brk
0x0000000000400174 munmap
0x0000000000400180 mprotect
0x000000000040018c mmap
0x0000000000400198 pread
0x00000000004001a4 bswap
.text 0x00000000004001d0 0x680 tmp/arm64-darwin.macho-main.o
0x000000000040037c do_xmap
0x0000000000400674 upx_main
*(.gnu.warning)
.fini
*(SORT(.fini))
0x00000000004012b8 PROVIDE (__etext, .)
0x00000000004012b8 PROVIDE (_etext, .)
0x00000000004012b8 PROVIDE (etext, .)
0x0000000000400850 PROVIDE (__etext, .)
0x0000000000400850 PROVIDE (_etext, .)
0x0000000000400850 PROVIDE (etext, .)
.rodata
*(.rodata .rodata.* .gnu.linkonce.r.*)
@@ -107,18 +107,18 @@ LOAD tmp/arm64-darwin.macho-main.o
.eh_frame_hdr
*(.eh_frame_hdr)
.eh_frame 0x00000000004012b8 0x1c8
.eh_frame 0x0000000000400850 0x110
*(.eh_frame)
.eh_frame 0x00000000004012b8 0x1c8 tmp/arm64-darwin.macho-main.o
0x1b8 (size before relaxing)
.eh_frame 0x0000000000400850 0x110 tmp/arm64-darwin.macho-main.o
0x108 (size before relaxing)
.gcc_except_table
*(.gcc_except_table .gcc_except_table.*)
.exception_ranges
*(.exception_ranges .exception_ranges*)
0x0000000000401480 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff))
0x0000000000411480 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000)
0x0000000000400960 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff))
0x0000000000410960 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000)
.eh_frame
*(.eh_frame)
@@ -136,22 +136,22 @@ LOAD tmp/arm64-darwin.macho-main.o
*(.tbss .tbss.* .gnu.linkonce.tb.*)
*(.tcommon)
.preinit_array 0x0000000000411480 0x0
0x0000000000411480 PROVIDE (__preinit_array_start, .)
.preinit_array 0x0000000000410960 0x0
0x0000000000410960 PROVIDE (__preinit_array_start, .)
*(.preinit_array)
0x0000000000411480 PROVIDE (__preinit_array_end, .)
0x0000000000410960 PROVIDE (__preinit_array_end, .)
.init_array 0x0000000000411480 0x0
0x0000000000411480 PROVIDE (__init_array_start, .)
.init_array 0x0000000000410960 0x0
0x0000000000410960 PROVIDE (__init_array_start, .)
*(SORT(.init_array.*))
*(.init_array)
0x0000000000411480 PROVIDE (__init_array_end, .)
0x0000000000410960 PROVIDE (__init_array_end, .)
.fini_array 0x0000000000411480 0x0
0x0000000000411480 PROVIDE (__fini_array_start, .)
.fini_array 0x0000000000410960 0x0
0x0000000000410960 PROVIDE (__fini_array_start, .)
*(SORT(.fini_array.*))
*(.fini_array)
0x0000000000411480 PROVIDE (__fini_array_end, .)
0x0000000000410960 PROVIDE (__fini_array_end, .)
.ctors
*crtbegin.o(.ctors)
@@ -180,43 +180,43 @@ LOAD tmp/arm64-darwin.macho-main.o
.got
*(.got)
*(.igot)
0x0000000000411480 . = DATA_SEGMENT_RELRO_END (., 0x18)
0x0000000000410960 . = DATA_SEGMENT_RELRO_END (., 0x18)
.got.plt 0x0000000000411480 0x0
.got.plt 0x0000000000410960 0x0
*(.got.plt)
*(.igot.plt)
.igot.plt 0x0000000000411480 0x0 tmp/arm64-darwin.macho-fold.o
.igot.plt 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
.data 0x0000000000411480 0x0
0x0000000000411480 PROVIDE (__data_start, .)
.data 0x0000000000410960 0x0
0x0000000000410960 PROVIDE (__data_start, .)
*(.data .data.* .gnu.linkonce.d.*)
.data 0x0000000000411480 0x0 tmp/arm64-darwin.macho-fold.o
.data 0x0000000000411480 0x0 tmp/arm64-darwin.macho-main.o
.data 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
.data 0x0000000000410960 0x0 tmp/arm64-darwin.macho-main.o
.data1
*(.data1)
0x0000000000411480 _edata = .
0x0000000000411480 PROVIDE (edata, .)
0x0000000000411480 . = .
0x0000000000411480 __bss_start = .
0x0000000000411480 __bss_start__ = .
0x0000000000410960 _edata = .
0x0000000000410960 PROVIDE (edata, .)
0x0000000000410960 . = .
0x0000000000410960 __bss_start = .
0x0000000000410960 __bss_start__ = .
.bss 0x0000000000411480 0x0
.bss 0x0000000000410960 0x0
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
.bss 0x0000000000411480 0x0 tmp/arm64-darwin.macho-fold.o
.bss 0x0000000000411480 0x0 tmp/arm64-darwin.macho-main.o
.bss 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
.bss 0x0000000000410960 0x0 tmp/arm64-darwin.macho-main.o
*(COMMON)
0x0000000000411480 . = ALIGN ((. != 0x0)?0x8:0x1)
0x0000000000411480 _bss_end__ = .
0x0000000000411480 __bss_end__ = .
0x0000000000411480 . = ALIGN (0x8)
0x0000000000411480 . = SEGMENT_START ("ldata-segment", .)
0x0000000000411480 . = ALIGN (0x8)
0x0000000000411480 __end__ = .
0x0000000000411480 _end = .
0x0000000000411480 PROVIDE (end, .)
0x0000000000411480 . = DATA_SEGMENT_END (.)
0x0000000000410960 . = ALIGN ((. != 0x0)?0x8:0x1)
0x0000000000410960 _bss_end__ = .
0x0000000000410960 __bss_end__ = .
0x0000000000410960 . = ALIGN (0x8)
0x0000000000410960 . = SEGMENT_START ("ldata-segment", .)
0x0000000000410960 . = ALIGN (0x8)
0x0000000000410960 __end__ = .
0x0000000000410960 _end = .
0x0000000000410960 PROVIDE (end, .)
0x0000000000410960 . = DATA_SEGMENT_END (.)
.stab
*(.stab)