GLdispatch: Move entry_get_patch_addresses into entry_common.c.

Move the function entry_get_patch_addresses into entry_common.c for all
architectures.

Now that it takes an index instead of a pointer, ther's no longer a difference
between ARMv7 and everything else.
This commit is contained in:
Kyle Brenneman 2017-05-02 16:46:07 -06:00
parent 9bde8ba6b1
commit 5222e64d82
3 changed files with 6 additions and 13 deletions

View file

@ -222,9 +222,3 @@ entry_get_public(int index)
return (mapi_func)(public_entry_start + (index * entry_stub_size) + 1);
}
void entry_get_patch_addresses(int index, void **writePtr, const void **execPtr)
{
void *entry = (void *) (public_entry_start + (index * entry_stub_size));
*execPtr = (const void *) entry;
*writePtr = entry;
}

View file

@ -74,3 +74,9 @@ int entry_patch_finish(void)
return entry_patch_mprotect(PROT_READ | PROT_EXEC);
}
void entry_get_patch_addresses(int index, void **writePtr, const void **execPtr)
{
void *entry = (void *) (public_entry_start + (index * entry_stub_size));
*execPtr = (const void *) entry;
*writePtr = (void *) entry;
}

View file

@ -59,10 +59,3 @@ mapi_func entry_get_public(int index)
{
return (mapi_func)(public_entry_start + (index * entry_stub_size));
}
void entry_get_patch_addresses(int index, void **writePtr, const void **execPtr)
{
void *entry = (void *) (public_entry_start + (index * entry_stub_size));
*execPtr = (const void *) entry;
*writePtr = (void *) entry;
}