-/* $OpenBSD: loader.c,v 1.195 2022/01/08 06:49:41 guenther Exp $ */
+/* $OpenBSD: loader.c,v 1.196 2022/10/28 15:07:25 kettenis Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
*/
map_link = NULL;
#ifdef __mips__
- if (exe_obj->Dyn.info[DT_MIPS_RLD_MAP - DT_LOPROC + DT_NUM] != 0)
+ if (exe_obj->Dyn.info[DT_MIPS_RLD_MAP_REL - DT_LOPROC + DT_NUM] != 0)
+ map_link = (struct r_debug **)(exe_obj->Dyn.info[
+ DT_MIPS_RLD_MAP_REL - DT_LOPROC + DT_NUM] + exe_loff);
+ else if (exe_obj->Dyn.info[DT_MIPS_RLD_MAP - DT_LOPROC + DT_NUM] != 0)
map_link = (struct r_debug **)(exe_obj->Dyn.info[
DT_MIPS_RLD_MAP - DT_LOPROC + DT_NUM] + exe_loff);
#endif
-/* $OpenBSD: exec.h,v 1.9 2017/08/13 14:56:09 visa Exp $ */
+/* $OpenBSD: exec.h,v 1.10 2022/10/28 15:07:25 kettenis Exp $ */
/*
* Copyright (c) 1996-2004 Per Fogelstrom, Opsycon AB
#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in .dynsym */
#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */
#define DT_MIPS_RLD_MAP 0x70000016 /* Address of debug map pointer */
+#define DT_MIPS_RLD_MAP_REL 0x70000035 /* Relative address of debug map ptr */
-#define DT_PROCNUM (DT_MIPS_RLD_MAP - DT_LOPROC + 1)
+#define DT_PROCNUM (DT_MIPS_RLD_MAP_REL - DT_LOPROC + 1)
/*
* Legal values for e_flags field of Elf32_Ehdr.