From owner-cvs-all Tue Sep 15 19:54:46 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA14658 for cvs-all-outgoing; Tue, 15 Sep 1998 19:54:46 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA14634; Tue, 15 Sep 1998 19:54:27 -0700 (PDT) (envelope-from jdp@FreeBSD.org) From: John Polstra Received: (from jdp@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id TAA12359; Tue, 15 Sep 1998 19:54:10 -0700 (PDT) Date: Tue, 15 Sep 1998 19:54:10 -0700 (PDT) Message-Id: <199809160254.TAA12359@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/libexec/rtld-elf rtld.c Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk jdp 1998/09/15 19:54:10 PDT Modified files: libexec/rtld-elf rtld.c Log: Fix a bug that showed up when debugging dynamically linked programs. References from GDB to "printf" and various other functions would find the versions in the dynamic linker itself, rather than the versions in the program's libc. This fix moves the GDB link map entry for the dynamic linker to the end of the search list, where its symbols will be found only if they are not found anywhere else. It was suggested by Doug Rabson, though I implemented it a little differently. I personally would prefer to leave the dynamic linker's entry out of the GDB search list altogether. But Doug argues that it is handy there for such things as setting breakpoints on dlopen(). So it stays for now, at least. Note, if we ever integrate the dynamic linker with libc (which has several important benefits to recommend it), this whole problem goes away. Revision Changes Path 1.10 +13 -3 src/libexec/rtld-elf/rtld.c