Don't test GNU-style ELF hashes on MIPS.
The MIPS toolchain can't generate them because they're incompatible with the MIPS ABI (which requires .dynsym match the GOT, while GNU-style requires .dynsym to be sorted by hash code), so there's nothing to test. Change-Id: I2220f452fe6fe595ec1312544cc741dd390a36a5
This commit is contained in:
@@ -188,8 +188,11 @@ TEST(dlfcn, dladdr_invalid) {
|
||||
ASSERT_TRUE(dlerror() == NULL); // dladdr(3) doesn't set dlerror(3).
|
||||
}
|
||||
|
||||
#if __BIONIC__
|
||||
// Our dynamic linker doesn't support GNU hash tables.
|
||||
#if defined(__BIONIC__)
|
||||
// GNU-style ELF hash tables are incompatible with the MIPS ABI.
|
||||
// MIPS requires .dynsym to be sorted to match the GOT but GNU-style requires sorting by hash code.
|
||||
#if !defined(__mips__)
|
||||
TEST(dlfcn, dlopen_library_with_only_gnu_hash) {
|
||||
dlerror(); // Clear any pending errors.
|
||||
void* handle = dlopen("no-elf-hash-table-library.so", RTLD_NOW);
|
||||
@@ -197,6 +200,7 @@ TEST(dlfcn, dlopen_library_with_only_gnu_hash) {
|
||||
ASSERT_STREQ("dlopen failed: empty/missing DT_HASH in \"no-elf-hash-table-library.so\" (built with --hash-style=gnu?)", dlerror());
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
TEST(dlfcn, dlopen_bad_flags) {
|
||||
dlerror(); // Clear any pending errors.
|
||||
|
Reference in New Issue
Block a user