Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Oct 1995 09:16:41 -0700
From:      Nate Williams <nate>
To:        CVS-commiters, cvs-gnu
Subject:   cvs commit: src/gnu/usr.bin/ld/rtld rtld.c
Message-ID:  <199510251616.JAA23460@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
nate        95/10/25 09:16:39

  Modified:    gnu/usr.bin/ld/rtld  rtld.c
  Log:
  Run-time linker speedups - Round One
  
  Implemented symbol memorizing to reduce the number of calls to lookup(),
  making relocation go faster.  While relocating a given shared object,
  the dynamic linker maintains a memorizing vector that is directly
  indexed by the symbol number in the relocation entry.  The first time a
  given symbol is looked up, the memorizing vector is filled in with a
  pointer to the symbol table entry, and a pointer to the so_map of the
  shared object in which the symbol was defined.  On subsequent uses of
  the same symbol, that information is retrieved directly from the
  memorizing vector, without calling lookup() again.
  
  A symbol that is referenced in a relocation entry is typically
  referenced in many relocation entries, so this memorizing reduces the
  number of calls to lookup() dramatically.  The overall improvement in
  the speed of dynamic linking is also dramatic -- as much as a factor of
  three for programs that use many shared libaries.
  
  Submitted by:	jdp@polstra.com "John Polstra"



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