Bug 628618 part 3 - An ElfSection is relocatable if it has the SHF_ALLOC flag set independently of other flags. r=tglek,a=sdwilsh
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 28 Jan 2011 09:22:58 +0100
changeset 61497 babff49f9e0df733c3cae832b997418702e32049
parent 61496 49f01e77666acf58caa0fd6c4bd311546cd0e39d
child 61498 b4a47cdebab6446343fcf5cdc4b3df77e840c75d
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewerstglek, sdwilsh
bugs628618
milestone2.0b11pre
Bug 628618 part 3 - An ElfSection is relocatable if it has the SHF_ALLOC flag set independently of other flags. r=tglek,a=sdwilsh
build/unix/elfhack/elfxx.h
--- a/build/unix/elfhack/elfxx.h
+++ b/build/unix/elfhack/elfxx.h
@@ -326,17 +326,17 @@ public:
 
     ElfSection *getNext() { return next; }
     ElfSection *getPrevious() { return previous; }
 
     virtual bool isRelocatable() {
         return ((getType() != SHT_NULL) &&
                 (getType() != SHT_NOBITS) &&
                 (getType() != SHT_PROGBITS) &&
-                (getFlags() == SHF_ALLOC));
+                (getFlags() & SHF_ALLOC));
     }
 
     void insertAfter(ElfSection *section) {
         if (previous != NULL)
             previous->next = next;
         if (next != NULL)
             next->previous = previous;
         previous = section;