From owner-freebsd-current Tue Nov 7 10: 8:43 2000 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 4677837B479; Tue, 7 Nov 2000 10:08:39 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id KAA11462; Tue, 7 Nov 2000 10:08:37 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.0/8.11.0) id eA7I8b324937; Tue, 7 Nov 2000 10:08:37 -0800 (PST) (envelope-from jdp) Date: Tue, 7 Nov 2000 10:08:37 -0800 (PST) Message-Id: <200011071808.eA7I8b324937@vashon.polstra.com> To: current@freebsd.org From: John Polstra Cc: sobomax@freebsd.org Subject: Re: Problem with dlopen()/dlsym() after recent crt* changes In-Reply-To: <3A066572.2CF3D7BC@FreeBSD.org> References: <3A066572.2CF3D7BC@FreeBSD.org> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <3A066572.2CF3D7BC@FreeBSD.org>, Maxim Sobolev wrote: > The full sources of this testcase can be found at: > http://people.freebsd.org/~sobomax/dlbug.tar.gz . Thanks for the nice test case. It made my job a lot easier. :-) The bug is in the dynamic linker. I'll append the patch to the end of this mail. The patch is relative to -stable, but the rtld.c source is identical in -current. I'm doing a little more testing, then I'll commit the fix to -current. And I'll ask Mr. Release Engineer to let me merge it into -stable. John Index: rtld.c =================================================================== RCS file: /home/ncvs/src/libexec/rtld-elf/rtld.c,v retrieving revision 1.43.2.4 diff -U9 -r1.43.2.4 rtld.c --- rtld.c 2000/09/22 02:22:51 1.43.2.4 +++ rtld.c 2000/11/07 17:43:44 @@ -1825,20 +1825,18 @@ symp = symlook_obj(name, hash, &obj_rtld, in_plt); if (symp != NULL && is_exported(symp)) { def = symp; defobj = &obj_rtld; } } if (def != NULL) *defobj_out = defobj; - else - _rtld_error("%s: Undefined symbol \"%s\"", refobj->path, name); return def; } static const Elf_Sym * symlook_list(const char *name, unsigned long hash, Objlist *objlist, const Obj_Entry **defobj_out, bool in_plt, DoneList *dlp) { const Elf_Sym *symp; const Elf_Sym *def; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message