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

Changes for the 5.20 release (the cctools-590.20 release):
- Removed the warnings when building. Radar bug #4340147.
  - Added -fno-builtin-round to the Makefile.

Changes for the 5.18 release (the cctools-583 release):
- Changed the Makefile so that when RC_XBS is set to YES then the compiler
  options -MD and -dependency-file as well as the md(1) program are not used.
  Radar bug #4029936.

Changes for the 5.17 release (the cctools-552 release):
- Changed ofi.c to used #include instead of #import so it gets <stdarg.h>
  correctly included.  Radar bug #3640701.

Changes for the 5.17 release (the cctools-534 release):
- Changed the Makefile to not install the archives when OLD_DYLD_STUFF is set.
  Radar bug #3780216.

Changes for the 5.17 release (the cctools-532 release):
- To allow ofi.c to build with gcc3.5 the static declarations needed for the
  inline strcmp were moved above the header file includes.  Radar bug #3765219.

Changes for the 5.13 release (the cctools-482 release):
- Added the SPI NSFindSectionAndOffsetInObjectFileImage() to ofi.c .  Radar
  bug #3318440.

Changes for the 5.12 release (the cctools-464 release):
- Added the SPI NSHasModInitObjectFileImage() to ofi.c .  Radar bug #3196951.
- Made changes to build cleanly with gcc3.3
  - Removed -Wno-precomp from the Makefile
  - Fixed warning for "comparison between signed and unsigned" in debug.c .

Changes for the 5.12 release (the cctools-463 release):
- Added real implementation for NSGetSectionDataInObjectFileImage() in ofi.c .
  Radar bug #3194204.

Changes for the 5.12 release (the cctools-461 release):
- Change the Makefile to run ranlib(1) after each install(1) command to make
  sure the archive table of contents is up todate.  Radar bug #3183053.

Changes for the 5.12 release (the cctools-460 release):
- Added real implementations for the following API's in ofi.c :
    NSSymbolDefinitionCountInObjectFileImage
    NSSymbolDefinitionNameInObjectFileImage
    NSSymbolReferenceCountInObjectFileImage
    NSSymbolReferenceNameInObjectFileImage
    NSIsSymbolDefinedInObjectFileImage
  Radar bug #3179011.

Changes for the 5.12 release (the cctools-457 release):
- Added a real implementation for the NSCreateObjectFileImageFromMemory() api
  in ofi.c.  Changed NSCreateImageFromFile() to NSCreateImageFromFileOrMemory()
  and used the newly added ofile_map_from_memory() to create an ofile from
  mapped memory.  Radar bug #3131622.

Changes for the 5.12 release (the cctools-448 release):
- Added the _dyld_get_image_header_containing_address() SPI to images.c 
  (Radar bug #2967928).

Changes for the 5.12 release (the cctools-447 release):
- Added the _dyld_all_twolevel_modules_prebound() SPI to images.c
  (Radar bug #3055372).

Changes for the 5.11 release (the cctools-440 release):
- Fixed the warnings about extra tokens at end of #endif directive in debug.c 
  (Radar bug #3072042).

Changes for the 5.11 release (the cctools-439 release):
- Changed make_dyld_image_data_writable() in debug.c to use 0x8fe00000 instead
  of 0x41100000 as the place to start looking in the address space for dyld.
  Radar bug #3042819.

Changes for the 5.10 release (the cctools-415 release):
- Changed the incomplete implementation of dlopen() to have the dlsym() function
  append the needed underbar for symbol name lookups.  Radar bug #2908831.

Changes for the 5.10 release (the cctools-414 release):
- Changed the call to mach_host_self() in get_or_start_debug_thread() in
  debug.c to call mach_port_deallocate() on the port after the call.  Radar bug
  #2895931.

Changes for the 5.10 release (the cctools-403 release):
- Changed the macos_lib_ofiles_install target in the Makefile to work when
  $SYMROOT is not set.  So the top level Makefile can do a make install and
  work by default.

Changes for the 5.10 release (the cctools-400 release):
- Changed the Makefile back to again use the -dependency-file with gcc.

Changes for the 5.10 release (the cctools-397 release):
- Added #include "stuff/bool.h" to images.c, bind.c, core.c, ofi.c,
  runtime_loading.c and dyld_support.c.  Also changed where "stuff/bool.h" was
  included in debug.c. Radar bug #2831923.
- Added _NSGetExecutablePath() to dyld_support.c.  Radar bug #2432816.

Changes for the 5.10 release (the cctools-396 release):
- Changed the Makefile to not use the -dependency-file with gcc as well as
  mwccppc.

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().
