diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-10-28 15:07:26 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-10-28 15:07:26 +0000 |
commit | 1806d1aa95630f4062f022e475802bad19ae1ac8 (patch) | |
tree | e74433dd66eaadaf781217495136a0146775528c /libexec/ld.so | |
parent | ad35fae8373b3bc2388bd738542f9c92c7631597 (diff) |
Implement support for DT_MIPS_RLD_MAP_REL.
ok deraadt@
Diffstat (limited to 'libexec/ld.so')
-rw-r--r-- | libexec/ld.so/loader.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 37aee92e602..4ed2527618e 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $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 @@ -616,7 +616,10 @@ _dl_boot(const char **argv, char **envp, const long dyn_loff, long *dl_data) */ 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 |