Bug 837551 - Ignore dynamic section headers of type DT_FLAGS_1. r=glandium
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 04 Feb 2013 09:58:54 -0500
changeset 120757 d8856e5b21350536c9c3cf21ebd3a672e29198ca
parent 120756 f01a7922583bb95042afff101ec1c5283de54683
child 120758 28cd2dbfd8f99147fb537ece66dc5891acd66043
push idunknown
push userunknown
push dateunknown
Bug 837551 - Ignore dynamic section headers of type DT_FLAGS_1. r=glandium
--- a/mozglue/linker/CustomElf.cpp
+++ b/mozglue/linker/CustomElf.cpp
@@ -583,16 +583,18 @@ CustomElf::InitDyn(const Phdr *pt_dyn)
       case DT_SYMBOLIC: /* Indicates internal symbols should be looked up in
                          * the library itself first instead of the executable,
                          * which is actually what this linker does by default */
       case RELOC(COUNT): /* Indicates how many relocations are relative, which
                           * is usually used to skip relocations on prelinked
                           * libraries. They are not supported anyways. */
       case UNSUPPORTED_RELOC(COUNT): /* This should error out, but it doesn't
                                       * really matter. */
+      case DT_FLAGS_1: /* Additional linker-internal flags that we don't care about. See
+                        * DF_1_* values in src/include/elf/common.h in binutils. */
       case DT_VERSYM: /* DT_VER* entries are used for symbol versioning, which */
       case DT_VERDEF: /* this linker doesn't support yet. */
       case DT_VERDEFNUM:
       case DT_VERNEED:
       case DT_VERNEEDNUM:
         /* Ignored */
--- a/mozglue/linker/Elfxx.h
+++ b/mozglue/linker/Elfxx.h
@@ -144,16 +144,19 @@
 #define DT_VERDEFNUM 0x6ffffffd
 #ifndef DT_VERNEED
 #define DT_VERNEED 0x6ffffffe
 #define DT_VERNEEDNUM 0x6fffffff
+#ifndef DT_FLAGS_1
+#define DT_FLAGS_1 0x6ffffffb
 #ifndef DT_FLAGS
 #define DT_FLAGS 30
 #ifndef DF_SYMBOLIC
 #define DF_SYMBOLIC 0x00000002
 #ifndef DF_TEXTREL
 #define DF_TEXTREL 0x00000004