From owner-cvs-all Sun Aug 29 18:49:21 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7439514C1B; Sun, 29 Aug 1999 18:49:14 -0700 (PDT) (envelope-from jdp@FreeBSD.org) Received: (from jdp@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA51932; Sun, 29 Aug 1999 18:48:19 -0700 (PDT) (envelope-from jdp@FreeBSD.org) Message-Id: <199908300148.SAA51932@freefall.freebsd.org> From: John Polstra Date: Sun, 29 Aug 1999 18:48:19 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/libexec/rtld-elf map_object.c rtld.c rtld.h src/libexec/rtld-elf/alpha reloc.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk jdp 1999/08/29 18:48:19 PDT Modified files: libexec/rtld-elf map_object.c rtld.c rtld.h libexec/rtld-elf/alpha reloc.c Log: Revamp the symbol lookup algorithm to cope better with objects loaded separately by dlopen that have global symbols with identical names. Viewing each dlopened object as a DAG which is linked by its DT_NEEDED entries in the dynamic table, the search order is as follows: * If the referencing object was linked with -Bsymbolic, search it internally. * Search all dlopened DAGs containing the referencing object. * Search all objects loaded at program start up. * Search all objects which were dlopened() using the RTLD_GLOBAL flag (which is now supported too). The search terminates as soon as a strong definition is found. Lacking that, the first weak definition is used. These rules match those of Solaris, as best I could determine them from its vague manual pages and the results of experiments I performed. PR: misc/12438 Revision Changes Path 1.5 +38 -2 src/libexec/rtld-elf/map_object.c 1.34 +193 -78 src/libexec/rtld-elf/rtld.c 1.9 +16 -3 src/libexec/rtld-elf/rtld.h 1.8 +2 -3 src/libexec/rtld-elf/alpha/reloc.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message