public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Patch for rtld.c
@ 2000-02-14  7:42 Andreas Jaeger
  2000-02-14 17:45 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Jaeger @ 2000-02-14  7:42 UTC (permalink / raw)
  To: libc-hacker

I've read today through rtld.c and noticed that we have a check for
_dl_rtld_map.l_opencount > 0 in dl_main but initialize it to 1. 

Looking closer together with Andreas Schwab, he found that the
following change changed one place where l_opencount was incremented
- but this place was forgotten:

1998-05-03  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/rtld.c (dl_main): Fix check for number of references to
	interpreter object.

I'm appending a patch to fix this (l_opencount == 1 means there's no
explicit ref).

Andreas

2000-02-14  Andreas Jaeger  <aj@suse.de>

	* elf/rtld.c (dl_main): Fix check for references to dynamic
	linker.


Index: elf/rtld.c
*** rtld.c	1999/08/19 23:17:32	1.154
--- rtld.c	2000/02/14 15:35:29
***************
*** 1041,1047 ****
        /* We must prepare the profiling.  */
        _dl_start_profile (_dl_profile_map, _dl_profile_output);
  
!     if (_dl_rtld_map.l_opencount > 0)
        {
  	/* There was an explicit ref to the dynamic linker as a shared lib.
  	   Re-relocate ourselves with user-controlled symbol definitions.  */
--- 1041,1047 ----
        /* We must prepare the profiling.  */
        _dl_start_profile (_dl_profile_map, _dl_profile_output);
  
!     if (_dl_rtld_map.l_opencount > 1)
        {
  	/* There was an explicit ref to the dynamic linker as a shared lib.
  	   Re-relocate ourselves with user-controlled symbol definitions.  */

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-02-14 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-14  7:42 Patch for rtld.c Andreas Jaeger
2000-02-14 17:45 ` Ulrich Drepper
2000-02-14 23:56   ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).