Restore DT_DEBUG processing

Pointed out by:	kevans
Fixes:	292cba9b49
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2022-01-06 09:14:09 +02:00
parent 3c94280825
commit 2bf21b0e8e

View File

@ -1461,6 +1461,12 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
obj->fini_array_num = dynp->d_un.d_val / sizeof(Elf_Addr);
break;
case DT_DEBUG:
if (!early)
dbg("Filling in DT_DEBUG entry");
(__DECONST(Elf_Dyn *, dynp))->d_un.d_ptr = (Elf_Addr)&r_debug;
break;
case DT_FLAGS:
if (dynp->d_un.d_val & DF_ORIGIN)
obj->z_origin = true;