engine: platform: android: sprinkle it with more const modifiers
This commit is contained in:
parent
cc53d59532
commit
3e7e81e078
1 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include "linker.h"
|
#include "linker.h"
|
||||||
|
|
||||||
static Elf_Sym *soinfo_elf_lookup( const soinfo *si, unsigned hash, const char *name )
|
static const Elf_Sym *soinfo_elf_lookup( const soinfo *si, unsigned hash, const char *name )
|
||||||
{
|
{
|
||||||
const Elf_Sym *symtab = si->symtab;
|
const Elf_Sym *symtab = si->symtab;
|
||||||
const char *strtab = si->strtab;
|
const char *strtab = si->strtab;
|
||||||
|
@ -87,15 +87,15 @@ static unsigned elfhash( const unsigned char *name )
|
||||||
Binary Interface) where in Chapter 5 it discuss resolving "Shared
|
Binary Interface) where in Chapter 5 it discuss resolving "Shared
|
||||||
Object Dependencies" in breadth first search order.
|
Object Dependencies" in breadth first search order.
|
||||||
*/
|
*/
|
||||||
static Elf_Sym *dlsym_handle_lookup( const soinfo *si, const char *name )
|
static const Elf_Sym *dlsym_handle_lookup( const soinfo *si, const char *name )
|
||||||
{
|
{
|
||||||
return soinfo_elf_lookup( si, elfhash((const unsigned char *)name ), name );
|
return soinfo_elf_lookup( si, elfhash((const unsigned char *)name ), name );
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void *dlsym_weak( void *handle, const char *symbol )
|
extern "C" void *dlsym_weak( void *handle, const char *symbol )
|
||||||
{
|
{
|
||||||
soinfo *found = (soinfo *)handle;
|
const soinfo *found = (soinfo *)handle;
|
||||||
Elf_Sym *sym = dlsym_handle_lookup( found, symbol );
|
const Elf_Sym *sym = dlsym_handle_lookup( found, symbol );
|
||||||
|
|
||||||
if( sym != NULL )
|
if( sym != NULL )
|
||||||
return (void *)( sym->st_value + found->base /*load_bias*/ );
|
return (void *)( sym->st_value + found->base /*load_bias*/ );
|
||||||
|
|
Loading…
Add table
Reference in a new issue