зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1080342 - Change how the symbols the flash plugin uses are hooked on Android. r=snorp
With bug 1077366, the linker makes the library containing it a fake LD_PRELOAD. As a consequence, instead of, in the linker itself, explicitely special-casing the symbols that disappeared in Android 4.4 that the flash plugin uses, it is now possible to use normal symbol resolution to stubs defined separately in libmozglue.
This commit is contained in:
Родитель
59b9a6c072
Коммит
35f933f139
|
@ -260,3 +260,20 @@ extern "C" NS_EXPORT size_t __wrap_strspn(const char * a0, const char * a1) { re
|
|||
extern "C" NS_EXPORT int __wrap_strcoll(const char * a0, const char * a1) { return __real_strcoll(a0, a1); }
|
||||
extern "C" NS_EXPORT size_t __wrap_strxfrm(char * a0, const char * a1, size_t a2) { return __real_strxfrm(a0, a1, a2); }
|
||||
#endif
|
||||
|
||||
/* Flash plugin uses symbols that are not present in Android >= 4.4 */
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
namespace android {
|
||||
namespace VectorImpl {
|
||||
NS_EXPORT void reservedVectorImpl1(void) { }
|
||||
NS_EXPORT void reservedVectorImpl2(void) { }
|
||||
NS_EXPORT void reservedVectorImpl3(void) { }
|
||||
NS_EXPORT void reservedVectorImpl4(void) { }
|
||||
NS_EXPORT void reservedVectorImpl5(void) { }
|
||||
NS_EXPORT void reservedVectorImpl6(void) { }
|
||||
NS_EXPORT void reservedVectorImpl7(void) { }
|
||||
NS_EXPORT void reservedVectorImpl8(void) { }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -74,11 +74,6 @@ static int p_flags_to_mprot(Word flags)
|
|||
((flags & PF_R) ? PROT_READ : 0);
|
||||
}
|
||||
|
||||
void
|
||||
__void_stub(void)
|
||||
{
|
||||
}
|
||||
|
||||
} /* anonymous namespace */
|
||||
|
||||
/**
|
||||
|
@ -330,16 +325,6 @@ CustomElf::GetSymbolPtrInDeps(const char *symbol) const
|
|||
return FunctionPtr(sigaction);
|
||||
}
|
||||
|
||||
#define MISSING_FLASH_SYMNAME_START "_ZN7android10VectorImpl19reservedVectorImpl"
|
||||
|
||||
// Android changed some symbols that Flash depended on in 4.4,
|
||||
// so stub those out here
|
||||
if (strncmp(symbol,
|
||||
MISSING_FLASH_SYMNAME_START,
|
||||
sizeof(MISSING_FLASH_SYMNAME_START) - 1) == 0) {
|
||||
return FunctionPtr(__void_stub);
|
||||
}
|
||||
|
||||
void *sym;
|
||||
|
||||
unsigned long hash = Hash(symbol);
|
||||
|
|
Загрузка…
Ссылка в новой задаче