Loading mozglue/linker/CustomElf.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -541,6 +541,28 @@ CustomElf::InitDyn(const Phdr *pt_dyn) debug_dyn("DT_FINI_ARRAYSZ", dyn); fini_array.InitSize(dyn->d_un.d_val); break; case DT_PLTREL: if (dyn->d_un.d_val != RELOC()) { log("%s: Error: DT_PLTREL is not " STR_RELOC(), GetPath()); return false; } break; case DT_SONAME: /* Should match GetName(), but doesn't matter */ 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_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 */ break; default: log("%s: Warning: dynamic header type #%" PRIxAddr" not handled", GetPath(), dyn->d_tag); Loading mozglue/linker/CustomElf.h +21 −4 Original line number Diff line number Diff line Loading @@ -114,22 +114,39 @@ #ifndef STN_UNDEF #define STN_UNDEF 0 #endif #ifndef DT_INIT_ARRAY #define DT_INIT_ARRAY 25 #endif #ifndef DT_FINI_ARRAY #define DT_FINI_ARRAY 26 #endif #ifndef DT_INIT_ARRAYSZ #define DT_INIT_ARRAYSZ 27 #endif #ifndef DT_FINI_ARRAYSZ #define DT_FINI_ARRAYSZ 28 #endif #ifndef DT_RELACOUNT #define DT_RELACOUNT 0x6ffffff9 #endif #ifndef DT_RELCOUNT #define DT_RELCOUNT 0x6ffffffa #endif #ifndef DT_VERSYM #define DT_VERSYM 0x6ffffff0 #endif #ifndef DT_VERDEF #define DT_VERDEF 0x6ffffffc #endif #ifndef DT_VERDEFNUM #define DT_VERDEFNUM 0x6ffffffd #endif #ifndef DT_VERNEED #define DT_VERNEED 0x6ffffffe #endif #ifndef DT_VERNEEDNUM #define DT_VERNEEDNUM 0x6fffffff #endif namespace Elf { Loading Loading
mozglue/linker/CustomElf.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -541,6 +541,28 @@ CustomElf::InitDyn(const Phdr *pt_dyn) debug_dyn("DT_FINI_ARRAYSZ", dyn); fini_array.InitSize(dyn->d_un.d_val); break; case DT_PLTREL: if (dyn->d_un.d_val != RELOC()) { log("%s: Error: DT_PLTREL is not " STR_RELOC(), GetPath()); return false; } break; case DT_SONAME: /* Should match GetName(), but doesn't matter */ 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_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 */ break; default: log("%s: Warning: dynamic header type #%" PRIxAddr" not handled", GetPath(), dyn->d_tag); Loading
mozglue/linker/CustomElf.h +21 −4 Original line number Diff line number Diff line Loading @@ -114,22 +114,39 @@ #ifndef STN_UNDEF #define STN_UNDEF 0 #endif #ifndef DT_INIT_ARRAY #define DT_INIT_ARRAY 25 #endif #ifndef DT_FINI_ARRAY #define DT_FINI_ARRAY 26 #endif #ifndef DT_INIT_ARRAYSZ #define DT_INIT_ARRAYSZ 27 #endif #ifndef DT_FINI_ARRAYSZ #define DT_FINI_ARRAYSZ 28 #endif #ifndef DT_RELACOUNT #define DT_RELACOUNT 0x6ffffff9 #endif #ifndef DT_RELCOUNT #define DT_RELCOUNT 0x6ffffffa #endif #ifndef DT_VERSYM #define DT_VERSYM 0x6ffffff0 #endif #ifndef DT_VERDEF #define DT_VERDEF 0x6ffffffc #endif #ifndef DT_VERDEFNUM #define DT_VERDEFNUM 0x6ffffffd #endif #ifndef DT_VERNEED #define DT_VERNEED 0x6ffffffe #endif #ifndef DT_VERNEEDNUM #define DT_VERNEEDNUM 0x6fffffff #endif namespace Elf { Loading