Bug 956398 - Only support text relocations for libflashplayer.so. r=nfroyd
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 25 Jan 2014 07:59:14 +0900
changeset 181194 67b10879f6546ad6ff7d7c37be1d3329eac0235c
parent 181193 fe06fb5e10a74be10c5f8ef66c50190196a25eb6
child 181195 8780eb7816322cb7727553296f2f2dab1c256244
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs956398
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 956398 - Only support text relocations for libflashplayer.so. r=nfroyd
mozglue/linker/CustomElf.cpp
--- a/mozglue/linker/CustomElf.cpp
+++ b/mozglue/linker/CustomElf.cpp
@@ -571,17 +571,22 @@ CustomElf::InitDyn(const Phdr *pt_dyn)
       case DT_SYMENT:
         debug_dyn("DT_SYMENT", dyn);
         if (dyn->d_un.d_val != sizeof(Sym)) {
           LOG("%s: Unsupported DT_SYMENT", GetPath());
           return false;
         }
         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);
         break;
       case UNSUPPORTED_RELOC():
       case UNSUPPORTED_RELOC(SZ):
       case UNSUPPORTED_RELOC(ENT):
         LOG("%s: Unsupported relocations", GetPath());
@@ -642,17 +647,22 @@ CustomElf::InitDyn(const Phdr *pt_dyn)
           return false;
         }
         break;
       case DT_FLAGS:
         {
            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;
            if (flags)
              LOG("%s: Warning: unhandled flags #%" PRIxAddr" not handled",
                  GetPath(), flags);
         }
         break;