Fix stub for MacOS El Capitan, which has "pre-linked" /usr/bin/dyld
https://github.com/upx/upx/issues/218 https://github.com/Homebrew/homebrew-core/pull/31846 modified: src/amd64-darwin.macho-main.c also *-darwin.mach-fold.{h,map}
This commit is contained in:
@@ -72,7 +72,7 @@ LOAD tmp/amd64-darwin.macho-main.o
|
||||
.plt
|
||||
*(.plt)
|
||||
|
||||
.text 0x0000000008048000 0x740
|
||||
.text 0x0000000008048000 0x7a7
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
.text 0x0000000008048000 0x157 tmp/amd64-darwin.macho-fold.o
|
||||
0x00000000080480b8 munmap
|
||||
@@ -87,17 +87,17 @@ LOAD tmp/amd64-darwin.macho-main.o
|
||||
0x00000000080480b4 mprotect
|
||||
0x00000000080480c0 close
|
||||
*fill* 0x0000000008048157 0x1 90909090
|
||||
.text 0x0000000008048158 0x5e8 tmp/amd64-darwin.macho-main.o
|
||||
.text 0x0000000008048158 0x64f tmp/amd64-darwin.macho-main.o
|
||||
0x00000000080482d4 do_xmap
|
||||
0x00000000080485ab upx_main
|
||||
0x0000000008048612 upx_main
|
||||
*(.text.*personality*)
|
||||
*(.gnu.warning)
|
||||
|
||||
.fini
|
||||
*(.fini)
|
||||
0x0000000008048740 PROVIDE (__etext, .)
|
||||
0x0000000008048740 PROVIDE (_etext, .)
|
||||
0x0000000008048740 PROVIDE (etext, .)
|
||||
0x00000000080487a7 PROVIDE (__etext, .)
|
||||
0x00000000080487a7 PROVIDE (_etext, .)
|
||||
0x00000000080487a7 PROVIDE (etext, .)
|
||||
|
||||
.rodata
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
@@ -113,8 +113,8 @@ LOAD tmp/amd64-darwin.macho-main.o
|
||||
|
||||
.gcc_except_table
|
||||
*(.gcc_except_table .gcc_except_table.*)
|
||||
0x0000000008048740 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
|
||||
0x0000000008049740 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000)
|
||||
0x00000000080487a7 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
|
||||
0x00000000080497a7 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000)
|
||||
|
||||
.eh_frame
|
||||
*(.eh_frame)
|
||||
@@ -129,22 +129,22 @@ LOAD tmp/amd64-darwin.macho-main.o
|
||||
*(.tbss .tbss.* .gnu.linkonce.tb.*)
|
||||
*(.tcommon)
|
||||
|
||||
.preinit_array 0x0000000008049740 0x0
|
||||
0x0000000008049740 PROVIDE (__preinit_array_start, .)
|
||||
.preinit_array 0x00000000080497a7 0x0
|
||||
0x00000000080497a7 PROVIDE (__preinit_array_start, .)
|
||||
*(.preinit_array)
|
||||
0x0000000008049740 PROVIDE (__preinit_array_end, .)
|
||||
0x00000000080497a7 PROVIDE (__preinit_array_end, .)
|
||||
|
||||
.init_array 0x0000000008049740 0x0
|
||||
0x0000000008049740 PROVIDE (__init_array_start, .)
|
||||
.init_array 0x00000000080497a7 0x0
|
||||
0x00000000080497a7 PROVIDE (__init_array_start, .)
|
||||
*(SORT(.init_array.*))
|
||||
*(.init_array)
|
||||
0x0000000008049740 PROVIDE (__init_array_end, .)
|
||||
0x00000000080497a7 PROVIDE (__init_array_end, .)
|
||||
|
||||
.fini_array 0x0000000008049740 0x0
|
||||
0x0000000008049740 PROVIDE (__fini_array_start, .)
|
||||
.fini_array 0x00000000080497a7 0x0
|
||||
0x00000000080497a7 PROVIDE (__fini_array_start, .)
|
||||
*(.fini_array)
|
||||
*(SORT(.fini_array.*))
|
||||
0x0000000008049740 PROVIDE (__fini_array_end, .)
|
||||
0x00000000080497a7 PROVIDE (__fini_array_end, .)
|
||||
|
||||
.ctors
|
||||
*crtbegin*.o(.ctors)
|
||||
@@ -170,35 +170,35 @@ LOAD tmp/amd64-darwin.macho-main.o
|
||||
|
||||
.got
|
||||
*(.got)
|
||||
0x0000000008049740 . = (. DATA_SEGMENT_RELRO_END 0xc)
|
||||
0x00000000080497a7 . = (. DATA_SEGMENT_RELRO_END 0xc)
|
||||
|
||||
.got.plt
|
||||
*(.got.plt)
|
||||
|
||||
.data 0x0000000008049740 0x0
|
||||
.data 0x00000000080497a8 0x0
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
.data 0x0000000008049740 0x0 tmp/amd64-darwin.macho-fold.o
|
||||
.data 0x0000000008049740 0x0 tmp/amd64-darwin.macho-main.o
|
||||
.data 0x00000000080497a8 0x0 tmp/amd64-darwin.macho-fold.o
|
||||
.data 0x00000000080497a8 0x0 tmp/amd64-darwin.macho-main.o
|
||||
*(.gnu.linkonce.d.*personality*)
|
||||
|
||||
.data1
|
||||
*(.data1)
|
||||
0x0000000008049740 _edata = .
|
||||
0x0000000008049740 PROVIDE (edata, .)
|
||||
0x0000000008049740 __bss_start = .
|
||||
0x00000000080497a8 _edata = .
|
||||
0x00000000080497a8 PROVIDE (edata, .)
|
||||
0x00000000080497a8 __bss_start = .
|
||||
|
||||
.bss 0x0000000008049740 0x0
|
||||
.bss 0x00000000080497a8 0x0
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
.bss 0x0000000008049740 0x0 tmp/amd64-darwin.macho-fold.o
|
||||
.bss 0x0000000008049740 0x0 tmp/amd64-darwin.macho-main.o
|
||||
.bss 0x00000000080497a8 0x0 tmp/amd64-darwin.macho-fold.o
|
||||
.bss 0x00000000080497a8 0x0 tmp/amd64-darwin.macho-main.o
|
||||
*(COMMON)
|
||||
0x0000000008049740 . = ALIGN ((. != 0x0)?0x4:0x1)
|
||||
0x0000000008049740 . = ALIGN (0x4)
|
||||
0x0000000008049740 . = ALIGN (0x4)
|
||||
0x0000000008049740 _end = .
|
||||
0x0000000008049740 PROVIDE (end, .)
|
||||
0x0000000008049740 . = DATA_SEGMENT_END (.)
|
||||
0x00000000080497a8 . = ALIGN ((. != 0x0)?0x4:0x1)
|
||||
0x00000000080497a8 . = ALIGN (0x4)
|
||||
0x00000000080497a8 . = ALIGN (0x4)
|
||||
0x00000000080497a8 _end = .
|
||||
0x00000000080497a8 PROVIDE (end, .)
|
||||
0x00000000080497a8 . = DATA_SEGMENT_END (.)
|
||||
|
||||
.stab
|
||||
*(.stab)
|
||||
|
||||
@@ -72,7 +72,7 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
|
||||
.plt
|
||||
*(.plt)
|
||||
|
||||
.text 0x0000000008048000 0x8c8
|
||||
.text 0x0000000008048000 0x94c
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
.text 0x0000000008048000 0x22c tmp/arm.v5a-darwin.macho-fold.o
|
||||
0x0000000008048128 munmap
|
||||
@@ -90,17 +90,17 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
|
||||
0x00000000080481d0 div10
|
||||
0x000000000804813c mprotect
|
||||
0x0000000008048100 close
|
||||
.text 0x000000000804822c 0x69c tmp/arm.v5a-darwin.macho-main.o
|
||||
.text 0x000000000804822c 0x720 tmp/arm.v5a-darwin.macho-main.o
|
||||
0x00000000080483e4 do_xmap
|
||||
0x0000000008048710 upx_main
|
||||
0x0000000008048794 upx_main
|
||||
*(.text.*personality*)
|
||||
*(.gnu.warning)
|
||||
|
||||
.fini
|
||||
*(.fini)
|
||||
0x00000000080488c8 PROVIDE (__etext, .)
|
||||
0x00000000080488c8 PROVIDE (_etext, .)
|
||||
0x00000000080488c8 PROVIDE (etext, .)
|
||||
0x000000000804894c PROVIDE (__etext, .)
|
||||
0x000000000804894c PROVIDE (_etext, .)
|
||||
0x000000000804894c 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.*)
|
||||
0x00000000080488c8 . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
|
||||
0x00000000080498c8 . = (0x1000 DATA_SEGMENT_ALIGN 0x1000)
|
||||
0x000000000804894c . = (ALIGN (0x1000) - ((0x1000 - .) & 0xfff))
|
||||
0x000000000804994c . = (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 0x00000000080498c8 0x0
|
||||
0x00000000080498c8 PROVIDE (__preinit_array_start, .)
|
||||
.preinit_array 0x000000000804994c 0x0
|
||||
0x000000000804994c PROVIDE (__preinit_array_start, .)
|
||||
*(.preinit_array)
|
||||
0x00000000080498c8 PROVIDE (__preinit_array_end, .)
|
||||
0x000000000804994c PROVIDE (__preinit_array_end, .)
|
||||
|
||||
.init_array 0x00000000080498c8 0x0
|
||||
0x00000000080498c8 PROVIDE (__init_array_start, .)
|
||||
.init_array 0x000000000804994c 0x0
|
||||
0x000000000804994c PROVIDE (__init_array_start, .)
|
||||
*(SORT(.init_array.*))
|
||||
*(.init_array)
|
||||
0x00000000080498c8 PROVIDE (__init_array_end, .)
|
||||
0x000000000804994c PROVIDE (__init_array_end, .)
|
||||
|
||||
.fini_array 0x00000000080498c8 0x0
|
||||
0x00000000080498c8 PROVIDE (__fini_array_start, .)
|
||||
.fini_array 0x000000000804994c 0x0
|
||||
0x000000000804994c PROVIDE (__fini_array_start, .)
|
||||
*(.fini_array)
|
||||
*(SORT(.fini_array.*))
|
||||
0x00000000080498c8 PROVIDE (__fini_array_end, .)
|
||||
0x000000000804994c PROVIDE (__fini_array_end, .)
|
||||
|
||||
.ctors
|
||||
*crtbegin*.o(.ctors)
|
||||
@@ -173,35 +173,35 @@ LOAD tmp/arm.v5a-darwin.macho-main.o
|
||||
|
||||
.got
|
||||
*(.got)
|
||||
0x00000000080498c8 . = (. DATA_SEGMENT_RELRO_END 0xc)
|
||||
0x000000000804994c . = (. DATA_SEGMENT_RELRO_END 0xc)
|
||||
|
||||
.got.plt
|
||||
*(.got.plt)
|
||||
|
||||
.data 0x00000000080498c8 0x0
|
||||
.data 0x000000000804994c 0x0
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
.data 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-fold.o
|
||||
.data 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-main.o
|
||||
.data 0x000000000804994c 0x0 tmp/arm.v5a-darwin.macho-fold.o
|
||||
.data 0x000000000804994c 0x0 tmp/arm.v5a-darwin.macho-main.o
|
||||
*(.gnu.linkonce.d.*personality*)
|
||||
|
||||
.data1
|
||||
*(.data1)
|
||||
0x00000000080498c8 _edata = .
|
||||
0x00000000080498c8 PROVIDE (edata, .)
|
||||
0x00000000080498c8 __bss_start = .
|
||||
0x000000000804994c _edata = .
|
||||
0x000000000804994c PROVIDE (edata, .)
|
||||
0x000000000804994c __bss_start = .
|
||||
|
||||
.bss 0x00000000080498c8 0x0
|
||||
.bss 0x000000000804994c 0x0
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
.bss 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-fold.o
|
||||
.bss 0x00000000080498c8 0x0 tmp/arm.v5a-darwin.macho-main.o
|
||||
.bss 0x000000000804994c 0x0 tmp/arm.v5a-darwin.macho-fold.o
|
||||
.bss 0x000000000804994c 0x0 tmp/arm.v5a-darwin.macho-main.o
|
||||
*(COMMON)
|
||||
0x00000000080498c8 . = ALIGN ((. != 0x0)?0x4:0x1)
|
||||
0x00000000080498c8 . = ALIGN (0x4)
|
||||
0x00000000080498c8 . = ALIGN (0x4)
|
||||
0x00000000080498c8 _end = .
|
||||
0x00000000080498c8 PROVIDE (end, .)
|
||||
0x00000000080498c8 . = DATA_SEGMENT_END (.)
|
||||
0x000000000804994c . = ALIGN ((. != 0x0)?0x4:0x1)
|
||||
0x000000000804994c . = ALIGN (0x4)
|
||||
0x000000000804994c . = ALIGN (0x4)
|
||||
0x000000000804994c _end = .
|
||||
0x000000000804994c PROVIDE (end, .)
|
||||
0x000000000804994c . = DATA_SEGMENT_END (.)
|
||||
|
||||
.stab
|
||||
*(.stab)
|
||||
|
||||
@@ -67,7 +67,7 @@ LOAD tmp/arm64-darwin.macho-main.o
|
||||
*(.iplt)
|
||||
.iplt 0x0000000000400080 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
|
||||
.text 0x0000000000400078 0x7d8
|
||||
.text 0x0000000000400078 0x860
|
||||
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
|
||||
*(.text.exit .text.exit.*)
|
||||
*(.text.startup .text.startup.*)
|
||||
@@ -87,16 +87,16 @@ LOAD tmp/arm64-darwin.macho-main.o
|
||||
0x000000000040018c mmap
|
||||
0x0000000000400198 pread
|
||||
0x00000000004001a4 bswap
|
||||
.text 0x00000000004001d0 0x680 tmp/arm64-darwin.macho-main.o
|
||||
.text 0x00000000004001d0 0x708 tmp/arm64-darwin.macho-main.o
|
||||
0x000000000040037c do_xmap
|
||||
0x0000000000400674 upx_main
|
||||
0x00000000004006fc upx_main
|
||||
*(.gnu.warning)
|
||||
|
||||
.fini
|
||||
*(SORT(.fini))
|
||||
0x0000000000400850 PROVIDE (__etext, .)
|
||||
0x0000000000400850 PROVIDE (_etext, .)
|
||||
0x0000000000400850 PROVIDE (etext, .)
|
||||
0x00000000004008d8 PROVIDE (__etext, .)
|
||||
0x00000000004008d8 PROVIDE (_etext, .)
|
||||
0x00000000004008d8 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 0x0000000000400850 0x110
|
||||
.eh_frame 0x00000000004008d8 0x108
|
||||
*(.eh_frame)
|
||||
.eh_frame 0x0000000000400850 0x110 tmp/arm64-darwin.macho-main.o
|
||||
0x108 (size before relaxing)
|
||||
.eh_frame 0x00000000004008d8 0x108 tmp/arm64-darwin.macho-main.o
|
||||
0x100 (size before relaxing)
|
||||
|
||||
.gcc_except_table
|
||||
*(.gcc_except_table .gcc_except_table.*)
|
||||
|
||||
.exception_ranges
|
||||
*(.exception_ranges .exception_ranges*)
|
||||
0x0000000000400960 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff))
|
||||
0x0000000000410960 . = DATA_SEGMENT_ALIGN (0x10000, 0x1000)
|
||||
0x00000000004009e0 . = (ALIGN (0x10000) - ((0x10000 - .) & 0xffff))
|
||||
0x00000000004109e0 . = 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 0x0000000000410960 0x0
|
||||
0x0000000000410960 PROVIDE (__preinit_array_start, .)
|
||||
.preinit_array 0x00000000004109e0 0x0
|
||||
0x00000000004109e0 PROVIDE (__preinit_array_start, .)
|
||||
*(.preinit_array)
|
||||
0x0000000000410960 PROVIDE (__preinit_array_end, .)
|
||||
0x00000000004109e0 PROVIDE (__preinit_array_end, .)
|
||||
|
||||
.init_array 0x0000000000410960 0x0
|
||||
0x0000000000410960 PROVIDE (__init_array_start, .)
|
||||
.init_array 0x00000000004109e0 0x0
|
||||
0x00000000004109e0 PROVIDE (__init_array_start, .)
|
||||
*(SORT(.init_array.*))
|
||||
*(.init_array)
|
||||
0x0000000000410960 PROVIDE (__init_array_end, .)
|
||||
0x00000000004109e0 PROVIDE (__init_array_end, .)
|
||||
|
||||
.fini_array 0x0000000000410960 0x0
|
||||
0x0000000000410960 PROVIDE (__fini_array_start, .)
|
||||
.fini_array 0x00000000004109e0 0x0
|
||||
0x00000000004109e0 PROVIDE (__fini_array_start, .)
|
||||
*(SORT(.fini_array.*))
|
||||
*(.fini_array)
|
||||
0x0000000000410960 PROVIDE (__fini_array_end, .)
|
||||
0x00000000004109e0 PROVIDE (__fini_array_end, .)
|
||||
|
||||
.ctors
|
||||
*crtbegin.o(.ctors)
|
||||
@@ -180,43 +180,43 @@ LOAD tmp/arm64-darwin.macho-main.o
|
||||
.got
|
||||
*(.got)
|
||||
*(.igot)
|
||||
0x0000000000410960 . = DATA_SEGMENT_RELRO_END (., 0x18)
|
||||
0x00000000004109e0 . = DATA_SEGMENT_RELRO_END (., 0x18)
|
||||
|
||||
.got.plt 0x0000000000410960 0x0
|
||||
.got.plt 0x00000000004109e0 0x0
|
||||
*(.got.plt)
|
||||
*(.igot.plt)
|
||||
.igot.plt 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
.igot.plt 0x00000000004109e0 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
|
||||
.data 0x0000000000410960 0x0
|
||||
0x0000000000410960 PROVIDE (__data_start, .)
|
||||
.data 0x00000000004109e0 0x0
|
||||
0x00000000004109e0 PROVIDE (__data_start, .)
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
.data 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
.data 0x0000000000410960 0x0 tmp/arm64-darwin.macho-main.o
|
||||
.data 0x00000000004109e0 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
.data 0x00000000004109e0 0x0 tmp/arm64-darwin.macho-main.o
|
||||
|
||||
.data1
|
||||
*(.data1)
|
||||
0x0000000000410960 _edata = .
|
||||
0x0000000000410960 PROVIDE (edata, .)
|
||||
0x0000000000410960 . = .
|
||||
0x0000000000410960 __bss_start = .
|
||||
0x0000000000410960 __bss_start__ = .
|
||||
0x00000000004109e0 _edata = .
|
||||
0x00000000004109e0 PROVIDE (edata, .)
|
||||
0x00000000004109e0 . = .
|
||||
0x00000000004109e0 __bss_start = .
|
||||
0x00000000004109e0 __bss_start__ = .
|
||||
|
||||
.bss 0x0000000000410960 0x0
|
||||
.bss 0x00000000004109e0 0x0
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
.bss 0x0000000000410960 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
.bss 0x0000000000410960 0x0 tmp/arm64-darwin.macho-main.o
|
||||
.bss 0x00000000004109e0 0x0 tmp/arm64-darwin.macho-fold.o
|
||||
.bss 0x00000000004109e0 0x0 tmp/arm64-darwin.macho-main.o
|
||||
*(COMMON)
|
||||
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 (.)
|
||||
0x00000000004109e0 . = ALIGN ((. != 0x0)?0x8:0x1)
|
||||
0x00000000004109e0 _bss_end__ = .
|
||||
0x00000000004109e0 __bss_end__ = .
|
||||
0x00000000004109e0 . = ALIGN (0x8)
|
||||
0x00000000004109e0 . = SEGMENT_START ("ldata-segment", .)
|
||||
0x00000000004109e0 . = ALIGN (0x8)
|
||||
0x00000000004109e0 __end__ = .
|
||||
0x00000000004109e0 _end = .
|
||||
0x00000000004109e0 PROVIDE (end, .)
|
||||
0x00000000004109e0 . = DATA_SEGMENT_END (.)
|
||||
|
||||
.stab
|
||||
*(.stab)
|
||||
|
||||
Reference in New Issue
Block a user