__________________________________________________________

(c)Copyright 1994 by Frank E. Haggar - ALL RIGHTS RESERVED
__________________________________________________________

                                                           24-Oct-1994

Program:    EXECHAIN,  Version 1.0 (BETA)

Purpose:    Chains duplicate relocation fixups produced by TLINK

            This program shrinks EXE, DLL, DRV, and other NE files by
            chaining and eliminating duplicate relocation records that
            frequently exist in programs linked with TLINK.

            It is possible to achieve from 5% up to 15% reduction in the
            file size of a NE program built using TLINK, depending on the
            number of relocations, number of duplicates, and the size of
            the NE sector alignment factor.

Support:    If you have questions or problems, please drop me a note at
            CIS: 72037,2017


==========================================================================

  WARNING: THIS IS A BETA VERSION OF A PRODUCT THAT MODIFIES EXECUTABLES
           TO COMPRESS THEIR SIZE ON DISK.   NO OTHER ALTERATIONS ARE
           PERFORMED, BUT PLEASE BE AWARE THAT THIS PRODUCT IS NOW BEING
           TESTED IN THE FIELD FOR THE FIRST TIME.   USE AT YOUR OWN RISK.

      **** PLEASE DO NOT DISTRIBUE EXECUTABLES THAT HAVE BEEN CHAINED ***
      **** UNTIL AFTER RESULTS FROM THIS FIELD TEST CAN BE COLLECTED! ***

==========================================================================

  License and usage considerations:
  ---------------------------------
      As a BETA version of EXECHAIN, there is no monetary charge associated
    with this specific version of the software.  I grant a non-exclusive
    single-user license to indivuduals interested in evaluating and testing
    this program's functionality.  I encourage individuals to report any
    problems or errors in the software so I can fix them, but I do not
    require you to do so.  (You are not required to contact me, although
    it will increase the likelihood of getting any problems resolved or
    suggestions implemented)

      Since an error in this program can potentially cause errors in the
    files it operates on, I do NOT grant permission to freely distribute
    this file on other public access systems without prior authorization
    from me.  Although I have put the program through a wide variety of
    verification proceedures, even a minor bug might result in a major
    bug in the compressed executable.   Therefore, I feel it's important
    to keep the distribution locations of the software to a minimum until
    it stands the test of time without incident.

      PLEASE DO NOT post this file on other BBS or electronic distribution
    systems, I do NOT grant that permission.  (This is intended to help all
    of us, since a bug might wind up causing problems in software you
    aquire from someone else.

      PLEASE DO try this program on executables YOU link with TLINK, and
    please let me know of any problems.   I HAVE TESTED THIS PROGRAM QUITE
    THOROUGHLY, AND I HAVE PROVIDED MANY VIEWS INTO THE DATA FOR THAT PURPOSE.
    I do feel the program is accurate and functional, but it's better to be
    safe than sorry.

       I do not encourage you to compress files that are not owned by you or
    your company, although the legalities of doing so are somewhat vague.
    Offhand it may seem like a copyright violation to alter the executable,
    or at least a license infraction, but if that were true, then the same
    could be said for archival compression products, as well as hard disk
    expansion products like Stacker, DoubleSpace, etc.   The same would be
    true for using PKZIP to compress a file temporarily into an archive so
    you could use the disk space for something else.

      All of these are technically violations, but so is making more than one
    monthly backup.  In many cases, you are licensed to have a copy on your
    machine and a second copy as an archive.  Microsoft recently recognized a
    flaw here, and now allow you to have a temporary copy in RAM so you can
    load and run the software without invalidating your license :-)

      To be safe,  until this proceedure is determined to be a simple method
    of compression archival (similar to DBLSPACE in purpose), I would
    discourage anyone from compressing software that you do not own the
    copyrights to.   In the interum, this program should give you an idea
    of the potential savings that chained relocations will provide.


==========================================================================



   Overview:
   ---------

       This program reads in New Executable (NE) files and processes the
     relocation records (fixups) looking for duplicates or chains.   The
     program can list a summary of this information on a segment-by-segment
     basis.  It will also produce overall totals for all relocation records,
     chained records, and duplicate records.

       This utility is based on the information about relocation record
     chaining which appeared in the July 1993 issue of Microsoft Systems
     Journal.  The title of the article is: "Liposuction Your Corpulent
     Executables and Remove Excess Fat", by Matt Pietrek (Volume 7, 1993)

        In his discussion of reducing the size of executables, Matt describes
     the Windows' loader support for chaining relocation record
     together by utilizing the target address for the head record as a link
     to another offset requiring the identical fixup value.   The chain is
     terminated by the occurance of 0xFFFF in the segment data at the fixup's
     target offset.

        EXECHAIN was written based on this concept, since not all linkers
     utilize this feature of the NE file format when creating executables.
     It can produce detailed lists on both the "before" and "after" files,
     and reports the overall savings in file size.



   Opening a file:
   ---------------
     Simply provide the name of an NE file on the command line or use the
     "Open" menu command to load an NE formatted file.  The program will
     report an error if non-NE formatted files are loaded.

     The main window will contain a brief summary of the relocation and
     duplicate fixup records for the file, providing totals of each and
     an estimate on how much space can be saved by using this program.

     Note that although these numbers are based on accurate relocation and
     file size counts, the final file size won't match exactly because the
     segment alignment factor can distort the results.  The calculations will
     report the correct number of bytes containing duplicate information,
     but it's possible to condense these without shrinking the actual file
     due to overly large segment alignment sizes.   Use Matt Pietrek's
     EXESIZE utility to determine the optimal alignment factor. If yours is
     not optimal, relink with the suggested value, then try EXECHAIN again.


   Viewing Fixups:
   ---------------
     Selecting the "View Fixup Dup/Chain Totals..." menu item will produce
   a dialog box containing a report of the number of chained and duplicated
   relocations on a segment-by-segment basis.   There are columns for each
   type of relocation, including additive relocations (which are not chained).


   Save Chained Fixups:
   --------------------
     This will prompt for a "Save As" filename, defaulting to the same
   filename with the extention ",NEW".    Be careful you don't have some
   source file named .NEW and inadvertantly overwrite it.  In fact, you'll
   recieve 2 prompts to overwrite any existing files.  If you tell me
   twice, I'll do it.  (No excuse for pressing the wrong button.. twice!)

     Upon successful completion of the duplicate relocation compression,
   the new file will automatically be loaded into the program just as if
   you had used the "Open" menu item yourself.   There will be a comparison
   of the old file size against the new file size so that you can see any
   differences, as well as the effect caused by segment alignment factors.




=============================================================================
  LEGAL DISCLAIMER:
  -----------------

     THE INFORMATION AND CODE PROVIDED HEREUNDER (COLLECTIVELY REFERRED
   TO AS "SOFTWARE") IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER
   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

    IN NO EVENT SHALL FRANK HAGGAR, MICROSOFT, BORLAND INTL., OR ANYONE ELSE
   BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT,
   INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES,
   EVEN IF FRANK HAGGAR OR ANY OTHER PARTY CREDITED WITHIN THIS SOFTWARE
   HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

     RUNNING THIS PROGRAM ACKNOWLEGES YOUR ACCEPTANCE OF THIS AGREEMENT.

============================================================================


  FINAL REQUEST:
  -------------

    Let's make sure NOBODY has any problems with this product first, please???

    Thank you for your help in evaluating the accuracy and functionality of
    this program.

   =========================================================================
     **** PLEASE DO NOT DISTRIBUE EXECUTABLES THAT HAVE BEEN CHAINED ****
     **** UNTIL AFTER RESULTS FROM THIS FIELD TEST CAN BE COLLECTED! ****
   =========================================================================


_____________________________________________________________________________


   Thank you very much for your interest and evaluation of this program!!!


     Frank E. Haggar
     CIS: 72037,2017


