summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/mach_override/README.chromium14
-rw-r--r--third_party/mach_override/chromium.diff139
2 files changed, 4 insertions, 149 deletions
diff --git a/third_party/mach_override/README.chromium b/third_party/mach_override/README.chromium
index 385ba92..20bbae5 100644
--- a/third_party/mach_override/README.chromium
+++ b/third_party/mach_override/README.chromium
@@ -2,8 +2,8 @@ Name: mach_override
Short Name: Part of the mach_star project
Version: Unknown
URL: https://github.com/rentzsch/mach_star
-Date: 04/11/2011
-Revision: 2cd209e090640220b48e5f97e7a366165f9de3f9
+Date: 04/18/2011
+Revision: 32c4560eb09848073f69
License: MIT
Security Critical: Yes.
@@ -12,7 +12,7 @@ Description:
This is the mach_override part of the lastest (as of 04/11/2011) revision of
mach_star, namely:
- https://github.com/rentzsch/mach_star/tree/2cd209e090640220b48e5f97e7a366165f9de3f9
+ https://github.com/rentzsch/mach_star/tree/aeb1720815c7255070da0f548267ccfdf7bd50b7
This package is used to replace framework functions with different
implementations at run time.
@@ -20,10 +20,4 @@ implementations at run time.
Local Modifications:
-* Minor fixes to make the file buildable with -std=c99 -Wall -Werror
-* Support for |sub %esp| with a 32bit immediate
-* atomic_mov64 is no longer .globl
-* Removed function mach_override() because it used deprecated functions
-* Added a gyp file
-
-See chromium.diff for details.
+None; all local changes have been upstreamed.
diff --git a/third_party/mach_override/chromium.diff b/third_party/mach_override/chromium.diff
deleted file mode 100644
index 2f65cea..0000000
--- a/third_party/mach_override/chromium.diff
+++ /dev/null
@@ -1,139 +0,0 @@
---- /Users/thakis/src/mach_star/mach_override/mach_override.c 2011-04-11 09:35:25.000000000 -0700
-+++ third_party/mach_override/mach_override.c 2011-04-12 16:21:19.000000000 -0700
-@@ -145,36 +145,6 @@
- #pragma mark -
- #pragma mark (Interface)
-
-- mach_error_t
--mach_override(
-- char *originalFunctionSymbolName,
-- const char *originalFunctionLibraryNameHint,
-- const void *overrideFunctionAddress,
-- void **originalFunctionReentryIsland )
--{
-- assert( originalFunctionSymbolName );
-- assert( strlen( originalFunctionSymbolName ) );
-- assert( overrideFunctionAddress );
--
-- // Lookup the original function's code pointer.
-- long *originalFunctionPtr;
-- if( originalFunctionLibraryNameHint )
-- _dyld_lookup_and_bind_with_hint(
-- originalFunctionSymbolName,
-- originalFunctionLibraryNameHint,
-- (void*) &originalFunctionPtr,
-- NULL );
-- else
-- _dyld_lookup_and_bind(
-- originalFunctionSymbolName,
-- (void*) &originalFunctionPtr,
-- NULL );
--
-- //printf ("In mach_override\n");
-- return mach_override_ptr( originalFunctionPtr, overrideFunctionAddress,
-- originalFunctionReentryIsland );
--}
--
- #if defined(__x86_64__)
- mach_error_t makeIslandExecutable(void *address) {
- mach_error_t err = err_none;
-@@ -563,8 +533,10 @@
- { 0x2, {0xFF, 0xFF}, {0x89, 0xE5} }, // mov %esp,%ebp
- { 0x1, {0xFF}, {0x53} }, // push %ebx
- { 0x3, {0xFF, 0xFF, 0x00}, {0x83, 0xEC, 0x00} }, // sub 0x??, %esp
-+ { 0x6, {0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, {0x81, 0xEC, 0x00, 0x00, 0x00, 0x00} }, // sub 0x??, %esp with 32bit immediate
- { 0x1, {0xFF}, {0x57} }, // push %edi
- { 0x1, {0xFF}, {0x56} }, // push %esi
-+ { 0x2, {0xFF, 0xFF}, {0x31, 0xC0} }, // xor %eax, %eax
- { 0x0 }
- };
- #elif defined(__x86_64__)
-@@ -584,7 +556,7 @@
- {
- Boolean match = true;
-
-- int i;
-+ size_t i;
- for (i=0; i<instruction->length; i++) {
- unsigned char mask = instruction->mask[i];
- unsigned char constraint = instruction->constraint[i];
-@@ -617,7 +589,7 @@
- // See if instruction matches one we know
- AsmInstructionMatch* curInstr = possibleInstructions;
- do {
-- if (curInstructionKnown = codeMatchesInstruction(ptr, curInstr)) break;
-+ if ((curInstructionKnown = codeMatchesInstruction(ptr, curInstr))) break;
- curInstr++;
- } while (curInstr->length > 0);
-
-@@ -665,10 +637,9 @@
- #endif
-
- #if defined(__i386__)
--asm(
-+__asm(
- ".text;"
- ".align 2, 0x90;"
-- ".globl _atomic_mov64;"
- "_atomic_mov64:;"
- " pushl %ebp;"
- " movl %esp, %ebp;"
-@@ -708,4 +679,4 @@
- *targetAddress = value;
- }
- #endif
--#endif
-\ No newline at end of file
-+#endif
---- /Users/thakis/src/mach_star/mach_override/mach_override.h 2011-04-11 09:35:25.000000000 -0700
-+++ third_party/mach_override/mach_override.h 2011-04-12 14:17:34.000000000 -0700
-@@ -57,42 +57,6 @@
- */
- #define err_cannot_override (err_local|1)
-
--/***************************************************************************//**
-- Dynamically overrides the function implementation referenced by
-- originalFunctionSymbolName with the implentation pointed to by
-- overrideFunctionAddress. Optionally returns a pointer to a "reentry island"
-- which, if jumped to, will resume the original implementation.
--
-- @param originalFunctionSymbolName -> Required symbol name of the
-- function to override (with
-- overrideFunctionAddress).
-- Remember, C function name
-- symbols are prepended with an
-- underscore.
-- @param originalFunctionLibraryNameHint -> Optional name of the library
-- which contains
-- originalFunctionSymbolName. Can
-- be NULL, but this may result in
-- the wrong function being
-- overridden and/or a crash.
-- @param overrideFunctionAddress -> Required address to the
-- overriding function.
-- @param originalFunctionReentryIsland <- Optional pointer to pointer to
-- the reentry island. Can be NULL.
-- @result <- err_cannot_override if the
-- original function's
-- implementation begins with the
-- 'mfctr' instruction.
--
-- ***************************************************************************/
--
-- mach_error_t
--mach_override(
-- char *originalFunctionSymbolName,
-- const char *originalFunctionLibraryNameHint,
-- const void *overrideFunctionAddress,
-- void **originalFunctionReentryIsland );
--
- /************************************************************************************//**
- Dynamically overrides the function implementation referenced by
- originalFunctionAddress with the implentation pointed to by overrideFunctionAddress.
-@@ -154,4 +118,4 @@
- #ifdef __cplusplus
- }
- #endif
--#endif // _mach_override_
-\ No newline at end of file
-+#endif // _mach_override_