From: visa Date: Sun, 4 Dec 2022 15:55:26 +0000 (+0000) Subject: ld.so: Disable DT_MIPS_RLD_MAP_REL X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9034200fc383d51770feb9f8473307fc91a23c72;p=openbsd ld.so: Disable DT_MIPS_RLD_MAP_REL The linker produces incorrect values for DT_MIPS_RLD_MAP_REL tags. Disable the handling of the tag in the dynamic loader. The linker will be fixed in a later commit when snapshots have the updated ld.so. Discussed with and OK kettenis@ deraadt@ --- diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 0cd15cdb524..a15c74b6b85 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.205 2022/12/04 15:42:07 deraadt Exp $ */ +/* $OpenBSD: loader.c,v 1.206 2022/12/04 15:55:26 visa Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -625,10 +625,7 @@ _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_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) + 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