diff --git a/engine/platform/android/dlsym-weak.cpp b/engine/platform/android/dlsym-weak.cpp index 7263221a..9a8bfae6 100644 --- a/engine/platform/android/dlsym-weak.cpp +++ b/engine/platform/android/dlsym-weak.cpp @@ -32,7 +32,7 @@ #include #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 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 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 ); } extern "C" void *dlsym_weak( void *handle, const char *symbol ) { - soinfo *found = (soinfo *)handle; - Elf_Sym *sym = dlsym_handle_lookup( found, symbol ); + const soinfo *found = (soinfo *)handle; + const Elf_Sym *sym = dlsym_handle_lookup( found, symbol ); if( sym != NULL ) return (void *)( sym->st_value + found->base /*load_bias*/ );