From 385503e19fd756c955fb493debec6f49a00f545c Mon Sep 17 00:00:00 2001 From: markj Date: Wed, 27 Aug 2014 19:51:42 +0000 Subject: MFC r265255, r270506: Allow "a.out" as an alias for the executable if no other matching entries are found. --- lib/libproc/proc_rtld.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libproc/proc_rtld.c') diff --git a/lib/libproc/proc_rtld.c b/lib/libproc/proc_rtld.c index 5259049..8dff3b7 100644 --- a/lib/libproc/proc_rtld.c +++ b/lib/libproc/proc_rtld.c @@ -49,6 +49,9 @@ map_iter(const rd_loadobj_t *lop, void *arg) if (phdl->rdobjs == NULL) return (-1); } + if (strcmp(lop->rdl_path, phdl->execname) == 0 && + (lop->rdl_prot & RD_RDL_X) != 0) + phdl->rdexec = &phdl->rdobjs[phdl->nobjs]; memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop)); return (0); -- cgit v1.1