From owner-cvs-all Sat May 5 16:21:12 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 645D837B423; Sat, 5 May 2001 16:21:05 -0700 (PDT) (envelope-from jdp@FreeBSD.org) Received: (from jdp@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f45NL5Z24754; Sat, 5 May 2001 16:21:05 -0700 (PDT) (envelope-from jdp) Message-Id: <200105052321.f45NL5Z24754@freefall.freebsd.org> From: John Polstra Date: Sat, 5 May 2001 16:21:05 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/libexec/rtld-elf rtld.c rtld.h src/libexec/rtld-elf/alpha reloc.c src/libexec/rtld-elf/i386 reloc.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jdp 2001/05/05 16:21:05 PDT Modified files: libexec/rtld-elf rtld.c rtld.h libexec/rtld-elf/alpha reloc.c libexec/rtld-elf/i386 reloc.c Log: Performance improvements for the ELF dynamic linker. These particularly help programs which load many shared libraries with a lot of relocations. Large C++ programs such as are found in KDE are a prime example. While relocating a shared object, maintain a vector of symbols which have already been looked up, directly indexed by symbol number. Typically, symbols which are referenced by a relocation entry are referenced by many of them. This is the same optimization I made to the a.out dynamic linker in 1995 (rtld.c revision 1.30). Also, compare the first character of a sought-after symbol with its symbol table entry before calling strcmp(). On a PII/400 these changes reduce the start-up time of a typical KDE program from 833 msec (elapsed) to 370 msec. MFC after: 5 days Revision Changes Path 1.52 +22 -6 src/libexec/rtld-elf/rtld.c 1.22 +11 -2 src/libexec/rtld-elf/rtld.h 1.12 +12 -5 src/libexec/rtld-elf/alpha/reloc.c 1.7 +10 -5 src/libexec/rtld-elf/i386/reloc.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message