Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Nov 2000 10:08:37 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        current@freebsd.org
Cc:        sobomax@freebsd.org
Subject:   Re: Problem with dlopen()/dlsym() after recent crt* changes
Message-ID:  <200011071808.eA7I8b324937@vashon.polstra.com>
In-Reply-To: <3A066572.2CF3D7BC@FreeBSD.org>
References:  <3A066572.2CF3D7BC@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <3A066572.2CF3D7BC@FreeBSD.org>,
Maxim Sobolev  <sobomax@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011071808.eA7I8b324937>