aboutsummaryrefslogtreecommitdiff
path: root/generated/darwin-inject-asm.S
diff options
context:
space:
mode:
authorcomex2015-01-24 20:04:20 -0500
committercomex2015-01-24 20:06:46 -0500
commitd89af8f6d5f3b971dda663081c03d790437c2f03 (patch)
tree2c17f0247ff3eef7d4338cadb069b1334ba785c6 /generated/darwin-inject-asm.S
parentCurrent version of generic-dis-*, for posterity (I'm sure it'll need to be ch... (diff)
downloadsubstitute-d89af8f6d5f3b971dda663081c03d790437c2f03.tar.gz
Add function to deal with mprotecting RW and back. A bit more complex than the minimum would be...
(and minor build fixes)
Diffstat (limited to 'generated/darwin-inject-asm.S')
-rw-r--r--generated/darwin-inject-asm.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/generated/darwin-inject-asm.S b/generated/darwin-inject-asm.S
index 1d1d1b8..abcb721 100644
--- a/generated/darwin-inject-asm.S
+++ b/generated/darwin-inject-asm.S
@@ -1,4 +1,15 @@
-
+/* Generated by script/gen-inject-asm.sh. The relevant source is in-tree (make
+ * out/darwin-inject-asm.S), but this file has been checked in too, in case
+ * your C compiler doesn't support all of these architectures.
+ * This file contains code for 4 architectures in one text page; it's remapped
+ * into the target process and the appropriate thunk executed. Having ARM code
+ * here on x86 and whatnot is currently pointless (and use of that code is
+ * disabled in case any future Rosetta-like emulator breaks naive attempts to
+ * inject into foreign-architecture processes), but we need two architectures
+ * anyway, so the rest are included in case doing so is useful someday. */
+.align 12
+.globl _inject_page_start
+_inject_page_start:
.align 2
.globl _inject_start_x86_64
_inject_start_x86_64:
@@ -6,7 +17,7 @@ _inject_start_x86_64:
.align 2
.globl _inject_start_i386
_inject_start_i386:
-.byte 0x55, 0x89, 0xe5, 0x53, 0x57, 0x56, 0x83, 0xec, 0x1c, 0x89, 0xce, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x58, 0x89, 0x74, 0x24, 0x0c, 0x8d, 0x80, 0x90, 0x00, 0x00, 0x00, 0x89, 0x44, 0x24, 0x08, 0x8d, 0x45, 0xf0, 0x89, 0x04, 0x24, 0xc7, 0x44, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0x16, 0x8b, 0x46, 0x0c, 0x89, 0xe1, 0x83, 0xf8, 0x00, 0x75, 0x33, 0x31, 0xff, 0xbb, 0x01, 0x00, 0x00, 0x00, 0xb8, 0xff, 0xff, 0xff, 0xff, 0x50, 0xb8, 0x40, 0x1f, 0x00, 0x00, 0x50, 0x57, 0x53, 0x57, 0xb8, 0xc2, 0xff, 0xff, 0xff, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x81, 0xc2, 0x09, 0x00, 0x00, 0x00, 0x0f, 0x34, 0x8b, 0x46, 0x0c, 0x89, 0xe1, 0x83, 0xf8, 0x00, 0x74, 0xd4, 0x81, 0xe6, 0x00, 0xf0, 0xff, 0xff, 0x31, 0xc0, 0x50, 0x50, 0x50, 0xb8, 0x00, 0x20, 0x00, 0x00, 0x50, 0x56, 0xb8, 0x69, 0x01, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x81, 0xc2, 0x09, 0x00, 0x00, 0x00, 0x0f, 0x34, 0xb8, 0xad, 0x0b, 0x00, 0x00, 0xff, 0xd0, 0x83, 0xc4, 0x1c, 0x5e, 0x5f, 0x5b, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x56, 0x83, 0xec, 0x14, 0x8b, 0x75, 0x08, 0x8b, 0x46, 0x08, 0x89, 0x04, 0x24, 0xc7, 0x44, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0x56, 0x04, 0xc7, 0x46, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x31, 0xc0, 0x83, 0xc4, 0x14, 0x5e, 0x5d, 0xc3
+.byte 0x55, 0x89, 0xe5, 0x56, 0x83, 0xec, 0x24, 0x89, 0xce, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x58, 0x89, 0x74, 0x24, 0x0c, 0x8d, 0x80, 0x80, 0x00, 0x00, 0x00, 0x89, 0x44, 0x24, 0x08, 0x8d, 0x45, 0xf8, 0x89, 0x04, 0x24, 0xc7, 0x44, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0x16, 0xeb, 0x21, 0xb8, 0xc2, 0xff, 0xff, 0xff, 0x89, 0xe1, 0x68, 0x40, 0x1f, 0x00, 0x00, 0x6a, 0x00, 0x6a, 0x01, 0x6a, 0x00, 0x50, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x81, 0xc2, 0x09, 0x00, 0x00, 0x00, 0x0f, 0x34, 0x83, 0x7e, 0x0c, 0x00, 0x74, 0xd9, 0x81, 0xe6, 0x00, 0xf0, 0xff, 0xff, 0x89, 0x75, 0xf4, 0xb8, 0x69, 0x01, 0x00, 0x00, 0x89, 0xe1, 0x6a, 0x00, 0x6a, 0x00, 0x68, 0x00, 0x20, 0x00, 0x00, 0xff, 0x75, 0xf4, 0x50, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x81, 0xc2, 0x09, 0x00, 0x00, 0x00, 0x0f, 0x34, 0xb8, 0xad, 0x0b, 0x00, 0x00, 0xff, 0xd0, 0x83, 0xc4, 0x24, 0x5e, 0x5d, 0xc3, 0x55, 0x89, 0xe5, 0x56, 0x83, 0xec, 0x14, 0x8b, 0x75, 0x08, 0x8b, 0x46, 0x08, 0x89, 0x04, 0x24, 0xc7, 0x44, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0x56, 0x04, 0xc7, 0x46, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x31, 0xc0, 0x83, 0xc4, 0x14, 0x5e, 0x5d, 0xc3
.align 2
.globl _inject_start_arm
_inject_start_arm: