diff --git a/mozglue/linker/CustomElf.cpp b/mozglue/linker/CustomElf.cpp index efd1a576552d..dc09114d2e4b 100644 --- a/mozglue/linker/CustomElf.cpp +++ b/mozglue/linker/CustomElf.cpp @@ -576,7 +576,12 @@ CustomElf::InitDyn(const Phdr *pt_dyn) } break; case DT_TEXTREL: - has_text_relocs = true; + if (strcmp("libflashplayer.so", GetName()) == 0) { + has_text_relocs = true; + } else { + LOG("%s: Text relocations are not supported", GetPath()); + return false; + } break; case DT_STRSZ: /* Ignored */ debug_dyn("DT_STRSZ", dyn); @@ -647,7 +652,12 @@ CustomElf::InitDyn(const Phdr *pt_dyn) Addr flags = dyn->d_un.d_val; /* Treat as a DT_TEXTREL tag */ if (flags & DF_TEXTREL) { - has_text_relocs = true; + if (strcmp("libflashplayer.so", GetName()) == 0) { + has_text_relocs = true; + } else { + LOG("%s: Text relocations are not supported", GetPath()); + return false; + } } /* we can treat this like having a DT_SYMBOLIC tag */ flags &= ~DF_SYMBOLIC;