diff options
author | rentzsch <jwr.git@redshed.net> | 2011-09-22 06:37:50 +0400 |
---|---|---|
committer | rentzsch <jwr.git@redshed.net> | 2011-09-22 06:37:50 +0400 |
commit | 0b55645a2d89337b620ce8f0527a01e8bcc1474a (patch) | |
tree | 494bd6a83c89bbb6aa0b04d91807fb57d9352115 | |
parent | e0a5b11f8a0412c7cac80200849190c2d7f7d9fc (diff) | |
parent | c0a35913578078ea3212eab46c5b544a98c3e83d (diff) |
Merge pull request #19 from mark-chromium/mach_star
---
Go back to pre-51ae3d199463fa84548f466d649f0821d579fdaf branch islands for PowerPC. Because PowerPC uses ba (branch absolute) to jump to branch islands, the islands must be somewhere in the lowest or highest 32MB of address space.
-rw-r--r-- | mach_override/mach_override.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mach_override/mach_override.c b/mach_override/mach_override.c index 8a4cf95..a4464fd 100644 --- a/mach_override/mach_override.c +++ b/mach_override/mach_override.c @@ -370,7 +370,10 @@ allocateBranchIsland( err = host_page_size( mach_host_self(), &pageSize ); if( !err ) { assert( sizeof( BranchIsland ) <= pageSize ); -#if defined(__x86_64__) +#if defined(__ppc__) || defined(__POWERPC__) + vm_address_t first = 0xfeffffff; + vm_address_t last = 0xfe000000 + pageSize; +#elif defined(__x86_64__) vm_address_t first = (uint64_t)originalFunctionAddress & ~(uint64_t)(((uint64_t)1 << 31) - 1) | ((uint64_t)1 << 31); // start in the middle of the page? vm_address_t last = 0x0; #else |