This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc/Hurd: dynamic linker RPC stub


   Date: Mon, 6 Jul 1998 12:40:14 -0400
   From: tb@MIT.EDU (Thomas Bushnell, n/BSG)

      From: Mark Kettenis <kettenis@phys.uva.nl>
      Date: Mon, 6 Jul 1998 14:48:23 +0200 (MET DST)

      This is also part of my changes to get the Hurd dynamic linker
      working.  There is a small problem, this might be compiled before the
      normal Hurd RPC stubs are generated, which doesn't work of course.
      For now the solution is to run make again.  I'll try to find a better
      solution, but the Makefiles are just too complex ...

      1998-07-05  Mark Kettenis  <kettenis@phys.uva.nl>

	      * sysdeps/mach/hurd/RPC_dl_io_write.c: New file.
	      * sysdeps/mach/hurd/Makefile: Make $(objpxf)librtld.os depend on
	      $(objpfx)RPC_dl_io_write.os.


   Could you explain why this is necessary?  We don't need it for any
   other RPC stub in ld.so...

The plain io_write RPC stubc calls _hurd_intr_rpc_mach_msg, which
needs the Hurd signal handling stuff, which hasn't been initialized
yet when ld.so starts up.  This was solved by having a weak
_hurd_intr_rpc_mach_msg in ld.so, which is overriden when libc.so is
loaded and ld.so is relocated.  This used to work fine, since no RPC's
where done between relocating ld.so and initializing the signal
Handling stuff.

However, when debugging output is enabled (via the new LD_DEBUG
environment variable), ld.so will call the io_write RPC several times
before initialization of the various Hurd subsystems, e.g. when
LD_DEBUG=bindings it writes information about every shared library
symbol lookup.  But after loading libc.so/relocating ld.so,
_hurd_intr_rpc_mach_msg in libc.so is called, which doesn't work
yet...

That's the same reason why I defined the function _dl_sysdep_write,
instead of just providinbg a weak defenition of __libc_write.

Mark



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]