diff options
-rw-r--r-- | libc/arch-mips/include/machine/elf_machdep.h | 2 | ||||
-rw-r--r-- | linker/linker.cpp | 4 | ||||
-rw-r--r-- | tools/relocation_packer/src/elf_file.cc | 4 | ||||
-rw-r--r-- | tools/relocation_packer/src/elf_traits.h | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/libc/arch-mips/include/machine/elf_machdep.h b/libc/arch-mips/include/machine/elf_machdep.h index 0aacedfe8..4db087b01 100644 --- a/libc/arch-mips/include/machine/elf_machdep.h +++ b/libc/arch-mips/include/machine/elf_machdep.h @@ -121,7 +121,7 @@ #define DT_MIPS_GOTSYM 0x70000013 /* first dynamic sym in got */ #define DT_MIPS_HIPAGENO 0x70000014 #define DT_MIPS_RLD_MAP 0x70000016 /* address of loader map */ -#define DT_MIPS_RLD_MAP2 0x70000035 /* offset of loader map, used for PIE */ +#define DT_MIPS_RLD_MAP_REL 0x70000035 /* offset of loader map, used for PIE */ /* * ELF Flags diff --git a/linker/linker.cpp b/linker/linker.cpp index 77f5359f3..0fdf90d2e 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -3658,8 +3658,8 @@ bool soinfo::prelink_image() { *dp = &_r_debug; } break; - case DT_MIPS_RLD_MAP2: - // Set the DT_MIPS_RLD_MAP2 entry to the address of _r_debug for GDB. + case DT_MIPS_RLD_MAP_REL: + // Set the DT_MIPS_RLD_MAP_REL entry to the address of _r_debug for GDB. { r_debug** dp = reinterpret_cast<r_debug**>( reinterpret_cast<ElfW(Addr)>(d) + d->d_un.d_val); diff --git a/tools/relocation_packer/src/elf_file.cc b/tools/relocation_packer/src/elf_file.cc index 014883d3b..96e6efd32 100644 --- a/tools/relocation_packer/src/elf_file.cc +++ b/tools/relocation_packer/src/elf_file.cc @@ -552,11 +552,11 @@ void ElfFile<ELF>::AdjustDynamicSectionForHole(Elf_Scn* dynamic_section, << " d_val adjusted to " << dynamic->d_un.d_val; } - // Special case: DT_MIPS_RLD_MAP2 stores the difference between dynamic + // Special case: DT_MIPS_RLD_MAP_REL stores the difference between dynamic // entry address and the address of the _r_debug (used by GDB) // since the dynamic section and target address are on the // different sides of the hole it needs to be adjusted accordingly - if (tag == DT_MIPS_RLD_MAP2) { + if (tag == DT_MIPS_RLD_MAP_REL) { dynamic->d_un.d_val += hole_size; VLOG(1) << "dynamic[" << i << "] " << dynamic->d_tag << " d_val adjusted to " << dynamic->d_un.d_val; diff --git a/tools/relocation_packer/src/elf_traits.h b/tools/relocation_packer/src/elf_traits.h index 1c938faaa..3e282b276 100644 --- a/tools/relocation_packer/src/elf_traits.h +++ b/tools/relocation_packer/src/elf_traits.h @@ -10,8 +10,8 @@ #include "elf.h" #include "libelf.h" -#if !defined(DT_MIPS_RLD_MAP2) -#define DT_MIPS_RLD_MAP2 0x70000035 +#if !defined(DT_MIPS_RLD_MAP_REL) +#define DT_MIPS_RLD_MAP_REL 0x70000035 #endif // ELF is a traits structure used to provide convenient aliases for |