Bug 956398 - Only support text relocations for libflashplayer.so. r=nfroyd

This commit is contained in:
Mike Hommey 2014-01-25 07:59:14 +09:00
parent 6bee3b5ae5
commit 7d7c694103

View File

@ -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;