File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1024,6 +1024,16 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress)
10241024 pointer, relative to the address of the tag */
10251025 auto shdr = tryFindSectionHeader (" .rld_map" );
10261026 if (shdr) {
1027+ /*
1028+ * "When correct, (DT_MIPS_RLD_MAP_REL + tag offset + executable base address) equals DT_MIPS_RLD_MAP"
1029+ * -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820334#5
1030+ *
1031+ * Equivalently,
1032+ *
1033+ * DT_MIPS_RLD_MAP_REL + tag offset + executable base address == DT_MIPS_RLD_MAP
1034+ * DT_MIPS_RLD_MAP_REL + executable base address == DT_MIPS_RLD_MAP - tag_offset
1035+ * DT_MIPS_RLD_MAP_REL == DT_MIPS_RLD_MAP - tag_offset - executable base address
1036+ */
10271037 auto rld_map_addr = findSectionHeader (" .rld_map" ).sh_addr ;
10281038 auto dyn_offset = ((char *)dyn) - ((char *)dyn_table);
10291039 dyn->d_un .d_ptr = rld_map_addr - dyn_offset - (*shdrDynamic).get ().sh_addr ;
You can’t perform that action at this time.
0 commit comments