Commit b3973a5b authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 734812 - Make the linker error out when text relocations are defined with DF_TEXTREL. r=nfroyd

parent 87ca7a1e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -550,6 +550,11 @@ CustomElf::InitDyn(const Phdr *pt_dyn)
      case DT_FLAGS:
        {
           Word flags = dyn->d_un.d_val;
           /* Treat as a DT_TEXTREL tag */
           if (flags & DF_TEXTREL) {
             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)
+3 −0
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@
#ifndef DF_SYMBOLIC
#define DF_SYMBOLIC 0x00000002
#endif
#ifndef DF_TEXTREL
#define DF_TEXTREL 0x00000004
#endif

namespace Elf {