We have serious but minor implementation difference in rtld.c which induces very weired problem, and workaround also induces a hard-to-track bug. It was fixed [1,2] after 5.2.1-RELEASE and 4.10-RELEASE. [1] http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1751749+0+archive/2004/cvs-all/20040229.cvs-all [2] http://www.freebsd.org/cgi/cvsweb.cgi/src/libexec/rtld-elf/rtld.c.diff?r1=1.91&r2=1.92&f=h # cd /usr/src/libexec/rtld-elf # patch < patch-rtld.c # make depend ; make ; make install --- libexec/rtld-elf/rtld.c.old Mon Jan 10 12:53:11 2005 +++ libexec/rtld-elf/rtld.c Mon Jan 10 12:51:36 2005 @@ -54,7 +54,6 @@ #include "rtld.h" #include "libmap.h" -#define END_SYM "_end" #define PATH_RTLD "/libexec/ld-elf.so.1" /* Types. */ @@ -1229,18 +1228,12 @@ static Obj_Entry * obj_from_addr(const void *addr) { - unsigned long endhash; Obj_Entry *obj; - endhash = elf_hash(END_SYM); for (obj = obj_list; obj != NULL; obj = obj->next) { - const Elf_Sym *endsym; - if (addr < (void *) obj->mapbase) continue; - if ((endsym = symlook_obj(END_SYM, endhash, obj, true)) == NULL) - continue; /* No "end" symbol?! */ - if (addr < (void *) (obj->relocbase + endsym->st_value)) + if (addr < (void *) (obj->mapbase + obj->mapsize)) return obj; } return NULL;