TODO:
- Test dlopen() with Apache, perl, and tcl.

Changes for the 5.9 release (the cctools-365 release):
- Added NSAddImage(), NSLookupSymbolInImage() and NSIsSymbolNameDefinedInImage()
  to dyld_support.c .  Radar bug #2689833.

Changes for the 5.9 release (the cctools-359 release):
- Added -Wno-long-double to shutup the compiler for
  <architecture/m88k/fp_regs.h>.

Changes for the the 5.8 release (the cctools-353 release):
- Changed NSIsSymbolNameDefinedWithHint() and NSLookupAndBindSymbolWithHint()
  in dyld_support.c and _dyld_lookup_and_bind_with_hint() in bind.c to call
  the new routines in dyld that actually implements these.  Radar bug #2571272.

Changes for the the 5.8 release (the cctools-350 release):
- Added NSIsSymbolNameDefinedWithHint() and NSLookupAndBindSymbolWithHint()
  to dyld_support.c.  And added _dyld_lookup_and_bind_with_hint() to bind.c.
  All of these are currently hacks that just call the original versions without
  the hints. Radar bug #2567184.

Changes for the the 5.8 release (the cctools-347 release):
- Added the _dyld_register_func_for_remove_image() routine to register_funcs.c.
  Radar bug #2553324.
- Added the NSAddLibraryWithSearching() routine to dyld_support.c.  Radar bug
  #2535633.

Changes for the the 5.7 release (the cctools-341 release):
- Implemented the previously unimplemented ofi_free() routine in ofi.c
  Radar bug #2500014.

Changes for the the 5.7 release (the cctools-329 release):
- Change the parameters to the unimplemented NSReplaceModule() api to change
  the last two parameters to just one parameter named options to match what
  is done in NSLinkModule() and NSUnLinkModule().  Radar bug #2469558.
- Removed the comment /* can be NULL */ from the parameter moduleName of
  NSLinkModule in runtime_loading.c .  Radar bug #2469558.
- Changed NSCreateObjectFileImageFromMemory() to return
  NSObjectFileImageFailure since it is not implemented.  Radar bug #2469558.
- Added the new function NSCreateCoreFileImageFromFile() to ofi.c .  Radar bug
  #2155790.
- Added the new function _dyld_debug_task_from_core() to the new file core.c 
  and also added the new header file debug.h to share stuff between debug.c and
  core.c.  Radar bug #2155790.

Changes for the the 5.7 release (the cctools-328 release):
- Changed where the libraries get installed by default.  So going forward things
  get install in /usr/local/lib/system and /Local/Developer/System
  is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen or Beaker.

Changes for the the 5.7 release (the cctools-327 release):
- Changed where the libraries get installed by default.  So going forward things
  get install in /AppleInternal/Developer/System and /Local/Developer/System
  is only used for RC_OS=macos when RC_RELEASE is Gonzo, Bunsen or Beaker.

Changes for the the 5.6 release (the cctools-326 release):
- Added 4 calls to ofile_unmap() in NSCreateImageFromFile() in the cases it
  fails so it will not leak a mapped file.  Radar bug #2459727.

Changes for the the 5.6 release (the cctools-323 release):
- Changed where the libraries get installed for the Space release in preparation
  of this "Half Plan" becoming the default for DP4 (Gonzo).  This directory
  /Local/Developer/System is changing to /AppleInternal/Developer/System.

Changes for the the 5.5 release (the cctools-314 release):
- Added code trough out debug.c to fill in the struct dyld_debug_error_data and
  call the function registered with the new API _dyld_debug_set_error_func()
  when one of the dyld debug API's fails.  Radar bug #2421770.

Changes for the 5.4 release (the cctools-296 release):
- For RC_OS=macos no longer build libdyld_static.a, the libdyld_pg.a version is
  now copied as libdyld_profile.a and a link to libdyld_debug.a is made from
  libdyld.a.

Changes for the 5.3 release (the cctools-294 release):
- Added _dyld_image_containing_address() to images.c .
- Fixed a bug in dlopen() in dlopen.c that did not correctly set the prev field
  of the dlopen_handle struct.

Changes for the 5.3 release (the cctools-293 release):
- Changed the interface to server_loop() to allow pthreads to be used.  The
  basic problem is that pthread_setspecific() does not take a target thread
  where cthread_set_data() does.  So both subscriber and dyld_event_routine
  needed to get to server_loop() so server_loop() could do the
  pthread_setspecific().
- Changed the first argument to pthread_once() to add an `&'.

Changes for the 5.3 release (the cctools-292 release):
- Changed ofi.c and debug.c to use pthreads instead of cthreads.  All ifdef'ed
  _POSIX_THREADS which comes from unistd.h.  The changes were:
    uses of mutex_t was changed to pthread_mutex_t
    the initialization was changed from NULL to PTHREAD_MUTEX_INITIALIZER
    uses of mutex_lock() was changed to pthread_mutex_lock()
    uses of mutex_unlock() was changed to pthread_mutex_unlock()

    uses of cthread_t was changed to pthread_t
    uses of cthread_fork() was changed to pthread_create()
    uses of cthread_set_data() was changed to pthread_key_create() and
	pthread_setspecific().
    uses of cthread_detach was changed to pthread_detach().
    uses of cthread_data() was changed to pthread_getspecific().

Changes for the 5.3 release (the cctools-287 release):
- Support for private images has been added to NSLinkModule.
- The support for NSUnLinkModule for only MH_BUNDLE file types has been added.
- dlopen() has been added.

Changes for the 5.3 release (the cctools-286 release):
- Change the use of the i386 cpp macro to __i386__ and ppc to __ppc__
- Added code to test the module termination functions.  In this version they
  are only called for things when NSUnLinkModule() is called.  So in this
  version there is a dummy NSUnLinkModule() that can be turned on with the
  ifdef TESTING_MOD_TERM to test this.

Changes for the 5.3 release (the cctools-285 release):
- Changed the Makefile to build libdyld.a, libdyld_pg.a and libdyld_static.a in
  $(DSTROOT)/Local/Developer/System for MacOS X, that is when $(RC_OS) is macos.
  This to allow System framework to be built without using SUBLIBROOTS.
  Radar bug #2268413.
- Picked up fixes in debug.c to the Mach 3.0 ported code made by David Peterson.
  Includes Radar bug #2286661.

Changes for the 5.3 release, MacOS X bring up (the cctools-282 release):
- Ported to Mach 3.0 with many __MACH30__ ifdef's in debug.c for IPC stuff.
- Changed host_self(), task_self() and thread_self(), to mach_host_self(),
  mach_task_self(), mach_thread_self() for MacOS X.  Also included
  "stuff/openstep_mach.h" for macros to allow it to still build on Openstep.
  Also changed ifdef's __SLICK__ to __OPENSTEP__.
- Changed the Makefile to allow for RC_OS=macos for MacOS X builds.
- Changed the Makefile to use MIG = $(NEXT_ROOT)/usr/bin/mig and $(MIG).
- Changed port_t to mach_port_t in debug.c for MacOS X port.
- Added a few casts in places to get it to compile with the MetroWerks compiler
  without -relax_pointers.
- Added the __declspec stuff for the MetroWerks compiler to debug.c .
- Changed the make rule to build _dyld_debugUser.o to not defined mig_external.
  I tried it with with the __declspec stuff for the MetroWerks compiler but it
  did not work in mach/mach_interface.h.

Changes for the 5.2 release (the cctools-279 release):
- Added a round_page() to the second vm_read() in get_dyld_data() so that the current
  kernel will not return KERN_INVALID_ARGUMENT.  Radar bug #2255036.

Changes for the 5.2 release (the cctools-278 release):
- Added an #import for stdarg.h in ofi.c as it won't compiled on Atlas1J3
  without it (it must have been getting lucky and included via some other
  header file).

Changes for the 5.2 release (the cctools-274 release):
- Corrected the fix for Radar bug #2218925 in get_dyld_data() in debug.c.
  New Radar bug #2236161.

Changes for the 5.2 release (the cctools-267 release):
- Added ifdef's CORE and CORE_DEBUG to debug.c for debugging the case when the
  task is created from a core file.  This is a work in progress.  Radar bug
  #2227769.

Changes for the 5.1 release (the cctools-263 release):
- Fixed a bug in get_dyld_data() in debug.c where the code was assuming the
  load command would always be in the same vm_region.  Radar bug #2218925.

Changes for the 5.1 release (the cctools-253 release):
- Changed the comments in dyld_support to reflect the the new directory
  layout for Preimer.

Changes for the 5.1 release (the cctools-247 release):
- Added MKDIRS if code to the Makefile to build native on Rhapsody.
- Changed the Makefile to use gnutar instead of tar because it works on Rhapsody
  where tar does not.
- Changed the Makefile so profiled objects get built for RC_OS teflon.
- Changed the code ifdef __TEFLON__ to ifndef __SLICK__ (where __TEFLON__ will
  nolonger be defined for Rhapsody builds) so the default builds will be native
  Rhapsody builds.  The changes were to debug.c, dyld_support.c, images.c and
  ofi.c.

Changes for the 5.0 release (the cctools-223 release):
- Put back the changes to NSVersionOfLinkTimeLibrary() in dyld_support.c 
  ifndef'ed __TEFLON__ .
- Put back the changes to NSCreateObjectFileImageFromFile() and 
  NSCreateObjectFileImageFromMemory() in ofi.c ifndef'ed __TEFLON__ .

Changes for the 5.0 release (the cctools-221.6 and cctools-222 releases):
- Picked up changes to NSVersionOfLinkTimeLibrary() in dyld_support.c to use
  _NSGetMachExecuteHeader().
- Picked up changes to NSCreateObjectFileImageFromFile() and 
  NSCreateObjectFileImageFromMemory() in ofi.c to use _NSGetArgv().

Changes for the 5.0 release (the cctools-221.4 and cctools-222 releases):
- Picked up changed entry_point.c to which changed struct ppc_thread_state_t to
  ppc_thead_state_t.

Changes for the 5.0 release (the cctools-221.1 and cctools-222 releases):
- Picked up changed to the Makefile to not build profile objects for teflon.
  This is because the PowerPC compiler core dumps with -pg.

Changes for the 5.0 release (the cctools-221 release):
- Picked up the changes for the correct Rhapsody thread state changes into
  debug.c.

Changes for the 5.0 release (the cctools-217 release):
- Wrote a thread_setup() in debug.c for PowerPC.

Changes for the 5.0 release (the cctools-211 release):
- Integrated changes to allow teflon builds (RC_OS=teflon or RC_OS=nextstep) to
  not build shlib_ofiles in the Makefile.  Also changes in the sources to not
  include <libc.h> for __TEFLON__ builds.

Changes for the 4.0 release (the cctools-181 release):
- Changed it so that /usr/local/lib/libdyld.a is no longer created.  To do this
  The module dyld_event_server.o, which defines _dyld_event_server(), needed to
  be moved into libsys.  This api as an undefined symbol,
  _dyld_event_server_callback(), that must be defined by the user.  To remove
  this undefined symbol private_callback.c was created (see the comments in
  there).  Then two ofileList files were created one for old style shlibs and
  one for dylibs and the Makefile was changed to install these.

Changes for the 4.0 release (the cctools-180 release):
- Picked up the sparc implementation of thread_setup() in debug.c (bug #59328).

Changes for the 4.0 release (the cctools-176 release):
- Added _dyld_lookup_and_bind_objc() (bug #58442).

Changes for the 4.0 release (the cctools-173 release):
- Implemented the stubs for the dyld library functions: NSNameOfModule,
  NSLibraryNameForModule, NSNameOfSymbol, NSIsSymbolNameDefined,
  NSLookupAndBindSymbol, NSAddressOfSymbol, NSModuleForSymbol, NSAddLibrary,
  NSVersionOfRunTimeLibrary.  The first three are allowed to be called in a
  multiply defined handler.

Changes for the 4.0 release (the cctools-170 release):
- Changed the dyld debug inteface to deal with a target task that is using the
  DYLD_MEM_PROTECT feature.  All that is done here is to make sure the data
  segment of dyld is writable before doing the dyld operation.  Could not
  figure out how to get it back to non-writable in either this interface or
  in dyld itself.

Changes for the 4.0 and Argon releases (the cctools-166.11 and cctools-170
releases):
- Changed THREAD_NULL to MACH_PORT_NULL so cctools will build in Argon.

Changes for the 4.0 release (the cctools-168 release):
- Added creating a symbolic link to dynamic_profile_obj from profile_obj.

Changes for the 4.0 PR1 release (the cctools-166.1 and cctools-167 releases):
- Implemented NSRunTimeLibraryVersion() (bug #53400) and changed the name of
  NSVersionOfLibrary() to NSVersionOfRunTimeLibrary().

Changes for the 4.0 release (the cctools-166 release):
- Changed the reference to NXArgv in ofi.c to use _dyld_lookup_and_bind() in
  the case of __DYNAMIC__ .

Changes for the 4.0 release (the cctools-161 release):
- Added a sed hack in the Makefile for building _dyld_eventServer.o which
  removed the "const" in the one case so that when this is put in a dynamic
  shared library it does not have relocation entries in a read-only section.

Changes for the 4.0 release (the cctools-155 release):
- Added a -I/LocalDeveloper/Headers/libsys to the shlib_ofiles options because
  RC did not compile cctools-154 with the right shlib.h and the hack below
  for cctools-154 failed to find shlib.h in ofile.c .

Changes for the 4.0 release (the cctools-154 release):
- Added dyld_debug_server.o to the shlib_ofiles.  To do this the mig generated
  file had to have "shlib.h" included.  To do that the Makefile was changed to
  use -i/LocalDeveloper/Headers/libsys/shlib.h and all the #ifdef SHLIB's were
  removed from the source files.  Then to make ../libstuff/ofile.c work it was
  changed to #if defined(SHLIB) && !defined(_dyld_event_server_callback) .

Changes for the 4.0 release (the cctools-150 release):
- Changed the profiled objects to be compiled with -dynamic.
- Changed everything to use __private_extern__ .

Changes for the 4.0 release (the cctools-148 release):
- Changed how the libdyld directory builds.  It now builds 4 libraries.  One
  for the following uses: static, dynamic, profiled and shlib.

Changes for the 4.0 release (the cctools-147 release):
- Added support for profiling dyld loaded code.
- Made public _dyld_debug_make_runnable() (was prepare_msg_send) and
  _dyld_debug_restore_runnable() (was finish_msg_send) and the struct
  _dyld_debug_task_state (was target_task_state).
- Added _dyld_get_image_name().

Changes for the 4.0 release (the cctools-141 release):
- Changed the stack size created for the debugging thread to 64 pages instead
  of 1 page.

Changes for the 4.0 release (the cctools-140 release):
- Changed the API names for dyld error handling.

Changes for the 4.0 release (the cctools-137 release):
- Added a check when trying to start the dyld debug thread so if the address of
  the starting point of the debug has not yet been set by the dynamic linker the
  thread can't be started.

Changes for the 4.0 release (the cctools-135 release):
- Added the dyld debug stuff.

Changes for the 4.0 release (the cctools-133 release):
- Added NXInstallDyldErrorHandlers().

Changes for the 4.0 release (the cctools-126 release):
- Changed the Makefile to not put temporary files in the profile_obj and
  optimized_obj directories.

Changes for the 4.0 release (the cctools-125 release):
- Added _dyld_present().

Changes for the 4.0 release (the cctools-120 release):
- Created this directory for the user library interface to the dynamic link
  editor.  All calls go indirect through _dyld_func_lookup().  Implemented
  three routines: _dyld_image_count(), _dyld_get_image_header() and
  _dyld_lookup_and_bind().
