Google
 

Trailing-Edge - PDP-10 Archives - BB-H138A-BM - 3a-documentation/lnk4-20.doc
There are 3 other files named lnk4-20.doc in the archive. Click here to see a list.


LINK.DOC -- Changes from V3A(560) to V4(765)
March 1978






























COPYRIGHT (C) 1976,1978 BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.


THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.

DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
LNK4.DOC                                                        Page 2


LINK.DOC -- Changes from V3A(560) to V4(765)
March 1978



1.0  SUMMARY

LINK is the linking  loader  for  the  DECSYSTEM-20.   OVRLAY  is  the
overlay handler for the DECSYSTEM-20.

LINK and OVRLAY both run under TOPS-20 Release 3.

LINK and OVRLAY are documented in the DECSYSTEM-20 User's Guide and in
the DECSYSTEM-20 LINK User's Guide.



2.0  EXTERNAL CHANGES

     1.  LINK generates an .EXE file with /SAVE switch.

         a.  /SAVE

         FORMAT     Filespec/SAVE.

         FUNCTION   Directs LINK to create an .EXE file with the given
                    filespec.

         EXAMPLES   *MYPROG
                    *DSKZ:GOODIE.EXE/SAVE/GO

                    Directs LINK to save the linked version of  MYPROG
                    as GOODIE.EXE on DSKZ:.

     2.  Supports PSECT.

         b.  /SET

         FORMAT     /SET:name:address.

                    Name = .HIGH., .LOW., or a PSECT name.

                    Address = an octal address, or a defined symbol.

         FUNCTION   Sets the loading position of a PSECT, or sets  the
                    .HIGH.  or .LOW.  relocation counter.

                    For setting the loading position of a PSECT,  name
                    is the name of the PSECT, and address is a virtual
                    memory address.  The PSECT will begin at the given
                    address.

                    For setting  relocation  counters,  name  gives  a
                    relocation counter (.HIGH.  or .LOW.), and address
                    gives the virtual memory address for the counter.
LNK4.DOC                                                        Page 3


         EXAMPLES   */SET:A:200000
                    *

                    Specifies that the PSECT named A is to  be  loaded
                    with its origin at address 200000.

                    */SET:.HIGH.:400000
                    *

                    Sets the high segment  relocation  counter  .HIGH.
                    to the address 400000.

         c.  /SYMSEG

         FORMAT     /SYMSEG:PSECT:name

         FUNCTION   Places the symbol table at the end of named  PSECT
                    so   that   it  will  not  be  overwritten  during
                    execution or debugging.

         EXAMPLES   */SYMSEG:PSECT:A
                    *

                    Places the symbol table at the end of PSECT A.

         d.  /COUNTER

         FORMAT     /COUNTER

         FUNCTION   Outputs to the  terminal  all  of  the  relocation
                    counter (PSECTs) values.

         e.  The LINK  MAP  files  will  contain  beginnning  and  end
             addresses for all the PSECTs for each module.

         f.  Three new PSECT .Rel blocks are added.  The  descriptions
             of  these  block types supersedes the descriptions in the
             LINK manual.

             Block type 24 -- PSECT header block

                    ---------------------------
                    !    24    !           3  !
                    ---------------------------
                    !           0             !
                    ---------------------------
                    !     PSECT   NAME        !
                    ---------------------------
                    ! ATTRIBUTE ! PSECT INDEX !
                    ---------------------------
                    !     PSECT   ORIGIN      !
                    ---------------------------

             Block type 23 -- PSECT end block
LNK4.DOC                                                        Page 4


                    ---------------------------
                    !    23     !           2 !
                    ---------------------------
                    !     Relocation word     !
                    ---------------------------
                    !       PSECT  NAME       !
                    ---------------------------
                    !       PSECT  BREAK      !
                    ---------------------------

             Block type 22 -- Change PSECT block

                    ---------------------------
                    !         22 !          2 !
                    ---------------------------
                    !            0            !
                    ---------------------------
                    !     PSECT     INDEX     !
                    ---------------------------

             or

                    ---------------------------
                    !        22  !          2 !
                    ---------------------------
                    !            0            !
                    ---------------------------
                    !     PSECT     NAME      !
                    ---------------------------
                    !     PSECT    ORIGIN     !
                    ---------------------------

     3.  New Error Messages:

         ?LNKIPX    INVALID PSECT index.

         ?LNKISS    Insufficient space for symbol  table  after  PSECT
                    XXXXXX.

         ?LNKNPS    Non-existent PSECT specified.

         %LNKPOV    PSECT overlap occurred:  n to m  PSECTS:   XXXXXX,
                    YYYYYY.

         ?LNKRPN    Relocatble PSECT  not  implimented -- /SET  Switch
                    required for PSECT:  XXXXXX.
LNK4.DOC                                                        Page 5


     4.  Performance Improvements

         a.  Prevent unnecessary clearing of vast amount of core after
             core shuffling.

         b.  Prevent PA1050 from coming back into core after LINK gets
             rid of it.

         c.  Better  paging  and  core  management  scheme  for  large
             PSECTed programs.

         d.  Prevent unnecessary disk overflow of programs with  large
             ( >128k ) core allocation.

     5.  Overflow files now have standard protection.

     6.  One edit (37) was added to OVRLAY.MAC.   This  edit  prevents
         output of a error message when the .OVL and .EXE file version
         inconsistancy check finds one to have a 0 version number.

     7.  LINK will no longer automatically load local symbols into  an
         overlaid program.  Locals will be loaded if /DEBUG, /TEST, or
         /SYMSEG are seen.

     8.  When loading FORTRAN or COBOL programs which are larger  than
         256  pages, LINK will now automatically load the OTS into the
         low segment.  Previous  versions  of  LINK  failed  with  the
         LNKHSL     message    unless    users    explicitely    typed
         /OTS:LOW/SEGMENT:LOW.

     9.  Better long error messages in LNKERR (same ones as in the new
         LINK manual).

     10. LINK will give %LNKPOV (PSECT overlays) warning message  when
         loading TOPS20 Release 3.  The messages may be ignored.



3.0  KNOWN BUGS AND DEFICIENCIES

     1.  To run this  version  of  LINK  under  TOPS20  Release  2  or
         earlier, LINK must be rebuilt (assembled and loaded) with the
         high  segment  origin  set  to  400000  (%HISEG==400000).   A
         problem  in  the  Release  2 PA1050 prevents LINK to run with
         high seg at 540000.

     2.  PSECTed programs with gaps (non-existent pages) in  its  core
         image  must  generate an EXE file.  The RUN or GET of the EXE
         file will set up the correct core image.
LNK4.DOC                                                        Page 6


4.0  INSTALLATION INSTRUCTIONS

4.1  Files Needed to Run LINK and OVRLAY

     <SUBSYS>PA1050.EXE
     <SUBSYS>LINK.EXE
     <SUBSYS>LINK.HLP
     <SUBSYS>*OTS.EXE (i.e., FOROTS.EXE or LIBO10.EXE)
     <SUBSYS>OVRLAY.REL


4.2  Instructions for Loading and Installing LINK and OVRLAY

Mount the tape labeled  Distribution  Tape  on  MTA0:   and  type  the
following commands:

     R DUMPER
     TAPE MTA0:
     REWIND
     DENSITY 1600-BPI
     SKIP 2
     RESTORE <*>LINK.EXE (TO) <SUBSYS>*.*.-1
     RESTORE <*>LINK.HLP (TO) <SUBSYS>*.*.-1
     RESTORE <*>OVRLAY.REL (TO) <SUBSYS>*.*.-1
     REWIND


4.3  Files Needed to Build LINK and OVRLAY

LINK is built from the following files:

     LNK*.MAC
     PLT*.MAC
     HELPER.REL
     SCN7B.REL
     JOBDAT.REL
     C.UNV
     SCNMAC.UNV
     LNKPRD.CMD
     LNKPLT.CMD
     LNKLNK.CCL

OVRLAY is built from the following files:

     OVRLAY.MAC
     MONSYM.UNV
LNK4.DOC                                                        Page 7


4.4  Instruction for Building LINK and OVRLAY

Mount the tape labeled  Distribution  Tape  on  MTA0:   and  type  the
following commands:

     R DUMPER
     TAPE MTA0:
     REWIND
     DENSITY 1600-BPI
     SKIP 3
     RESTORE <*>*.* (TO) <self>*.*
     REWIND
     ^C
     SUBMIT LINK/TIME:1:0:0


4.5  Special Considerations

None.



5.0  INTERNAL CHANGES


5.1  Changes To LINK

All changes made to LINK version  3A(560)  to  generate  LINK  version
4(765) are summarized below.


;START OF VERSION 4
;561      DCE     19-Jul-76      SPR 20359
;         Fix up returns from F10 subroutines when MIXFOR set
;         Routine: LNKLOD

;562      JNG     20-Jul-76      QAR CSM
;         Prevent ?ILL MEM REF when searching an indexed library if an
;         entry point is encountered that is already partially defined.
;         Routines: LNKOLD

;563      JNG     20-Jul-76      QAR U. Chicago
;         Prevent erroneous ?LNKIMM message when a module is indeed
;         loaded, but not as a result of a /INCLUDE switch (user loaded
;         it directly, or it contained entry point(s) which satisfied
;         some undefined globals in /SEARCH mode).
;         Routines: LNKOLD

;564      JNG     20-Jul-76
;         Make LINK assemble properly with MACRO 52.
;         Routines: LNKERR, LNKLOG

;565      DCE     21-Jul-76      SPR 20150
;         Prevent LINK from doing bad things when loading
;         block type 10 with the /ONLY:LOW switch set.
LNK4.DOC                                                        Page 8


;         ROUTINE: LNKOLD

;566      JNG     21-Jul-76      QAR EVS
;         Prevent incorrect symbol tables in user's core image and maps
;         that indicate that modules end at zero when paging.
;         Routines: LNKCOR

;567      JNG     21-Jul-76      QAR SRM
;         Prevent ?LNKISP message when a deferred global
;         definition is seen for a symbol that is already defined.
;         Routines: LNKOLD,LNKLOW

;570      JNG     22-Jul-76      QAR EVS
;         Prevent loss of local symbols in DDT symbol table when
;         some undefined symbols are present and the LS area is paging.
;         Routines: LNKXIT

;571      JNG     19-Sep-76      QAR U. Ill.
;         Prevent ?ILL MEM REF when one require file requires another.
;         Routines: LNKOLD

;572      JNG     20-Sep-76      QAR EVS
;         Make sure LS addr in core before doing POLISH symbol fixup.
;         Routines: LNKLOD,LNKOLD

;573      JNG     21-Sep-76      QAR EG&G
;         Prevent random USETO when ROOT of a relocatable overlay
;         structure has no external symbols.
;         Routines: LNKOV2

;574      JNG     30-Sep-76      SPR 20115
;         Load OTS into low seg if no high seg exists yet and low
;         seg is larger than 128K (256P).
;         Routines: LNKLOD

;575      JNG     6-Oct-76       SPR 19781
;         On /SAVE/EXECUTE, always specify extension of .LOW to
;         the RUN UUO if a two-segment program so the monitor will
;         ignore any .EXE file of the same name.
;         Routines: LNKXIT

;576      JNG     2-Dec-76
;         Correct usage of PT.SGN & PT.OTH in INTTAB hash table.
;         Routines: LNKOV2

;577      JNG     6-Dec-76       SPR 21566
;         Generate a fixup instead of HALTing when local block names
;         are encountered and the LS area is paging to disk.
;         Routines: LNKPAR,LNKOLD,LNKCOR

;600      JNG     17-Dec-76
;         Change LNKHST &LNKLOW to load with each segment rather than
;         assembling with each file.  This saves much re-assembling when
;         LNKHST is changed.  Also change to use REL:SCAN.REL.
;         Routines: LNKHST,LNKPAR,LNKLOW,LNKEXO,LNKSCN,LNKINI,*.CCL
LNK4.DOC                                                        Page 9



;601      JNG     19-Dec-76      SPR 10-21427
;         Print the correct version in the map if a /VERSION switch
;         has been seen.
;         Routines: LNKMAP

;602      JNG     19-Dec-76      SPR 10-21535
;         Ignore ASCII text in non-loaded library modules.
;         Routines: LNKNEW

;603      JNG     19-Dec-76
;         Delete redundant assembly parameter PPDL, use LN.PPD
;         everywhere.
;         Routines: LNKPAR,LNKOLD

;604      JNG     20-Dec-76      QAR LSS
;         Handle device NUL: correctly in all cases.
;         Routines: LNKCOR,LNKFIO,LNKINI,LNKMAP

;605      JNG     21-Dec-76      QAR EJW
;         Use OUTSTR's instead of OUTCHR's to TTY whenever possible.
;         Routines: LNKLOD,LNKLOG,LNKOV1,LNKWLD

;606      JNG     21-Dec-76
;         Get the protection of .HGH and .XPN files right.
;         Routines: LNKXIT

;607      JNG     7-Jan-77       QAR PMH
;         Make /HELP work on TOPS-20.
;         Routines: LNKINI

;610      JNG     15-Jan-77      SPR 10-21730
;         Modify file spec defaulting routines to handle ersatz devices
;         correctly (e.g. [1,2,3]/DEFAULT:INPUT, then REL:HELPER
;         as an explicit file spec).
;         Routines: LNKFIO,LNKWLD

;611      DMN     21-Jan-77
;         Add support for COBOL-74.
;         Routines: LNKPAR,LNKMAP,LNKLOD,LNKERR

;612      JNG     22-Jan-77      QAR JBS
;         Fix various polish bugs when a symbol is defined via a
;         polish string, esp. if it is then referenced in another.
;         Routines: LNKOLD,LNKLOD

;613      JNG     23-Jan-77      SPR 10-21868
;         Load all user-defined default libraries before considering
;         system default libraries so FOROTS will always go into the
;         right segment.
;         Routines: LNKLOD

;614      JNG     23-Jan-77
;         Re-search FORLIB if more FORTRAN code is seen in ALGLIB.
;         Routines: LNKLOD.
LNK4.DOC                                                       Page 10



;615      JNG     23-Jan-77
;         Never load blank file specs (broken by edit 610).
;         Routines: LNKWLD

;616      JNG     23-Jan-77      SPR 10-21881
;         Give a better error message than HALT if RENAMEs fail
;         in LNKXIT.
;         Routines: LNKXIT

;617      JNG     5-Feb-77
;         Fix .REQUEST/.REQUIRE and /OVERLAY (broken by 610 and 615).
;         Routines: LNKWLD

;620      JNG     6-Feb-77
;         When merging a corrected file spec, don't overwrite the old
;         device unless a new device was specified.
;         Routines: LNKWLD


;621      MCHC    1-NOV-76
;         /SAVE and /SSAVE switches generate an EXE file.
;         /SAVE and /SSAVE no longer takes any argument.
;         The code for generating .SHR/.HGH/.LOW is
;         under conditional assembly FTEXE==0.

;622      MCHC    21-JAN-77
;         Don't do HJBSET if there is no high seg.
;         LNKXIT

;623      JNG     7-Feb-77       SPR 10-21908
;         Don't blow up on two /PLOT switches
;         Routines: LNKOV1

;624      JNG     23-Feb-77      SPR 10-21900
;         Add a long message for ?LNKKIA.
;         Routines: LNKERR

;625      JNG     24-Feb-77      SPR 10-21899
;         Print an extra blank line in the log file after the ELN message.
;         Routines: LNKPAR,LNKLOG,LNKOV1

;626      JNG     25-Feb-77      SPR 10-21898
;         Don't search bound globals when a partial definition is seen
;         Routines: LNKOLD

;627      JNG     27-Feb-77      SPR 10-21896
;         Always type entire list of defining link numbers on %LNKARL
;         message, even if list takes more than 5 character to type.
;         Routines: LNKOV2

;630      JNG     27-Feb-77      SPR 10-21895
;         Don't forget INCLUDEd or EXCLUDEd files after asking
;         the user to correct an incorrect file specification.
;         Routines: LNKLOD
LNK4.DOC                                                       Page 11



;631      JNG     27-Feb-77      SPR 10-21894
;         Print the correct file spec in the LNKEOV message.
;         Routines: LNKOV1

;632      JNG     28-Feb-77
;         Fix $LOCATION to always work, and add $FIXUP.
;         Routines: LNKCOR,LNKLOD,LNKOLD,LNKOV1

;633      JNG     14-Mar-77
;         Don't point any fixups at a Polish string until we're sure
;         we want the Polish (might be /ONLY, non-loaded local, etc.)
;         Routines: LNKOLD

;634      JNG     7-Apr-77       SPR 10-22464
;         Never delete the user's input file on a fatal error, even
;         if its extension is .TMP.
;         Routines: LNKLOG

;635      JNG     10-Apr-77      SPR 10-22351
;         Handle too many %LNKARL messages gracefully.  This edit
;         adds the /ARSIZE switch and the %LNKTMA and ?LNKABT
;         messages.
;         Routines: LNKPAR,LNKLOW,LNKINI,LNKOV1,LNKOV2,LNKSUB,LNKERR

;636      JNG     17-Apr-77
;         Make TTYIT preserve T1, avoid ^H's to the TTY.
;         Routines: LNKINI

;637      JNG     17-Apr-77
;         Always give batch jobs the continuation error text on fatal
;         errors, since there is no user to type "continue".
;         Routines: LNKLOG

;640      JNG     17-Apr-77
;         Avoid further disk overflow in LNKMAP if possible.
;         Routines: LNKMAP,LNKCOR

;641      MCHC    10-FEB-77
;         Always do HC.OUT of what's in core to ensure updated vestigial 
;         JOBDAT before generating an EXE file.
;         LNKXIT

;642      MCHC    11-FEB-77
;         Uses EXE file extension for the disk file generated as result of
;         not having enough core (in JBNC).
;         LNKXIT

;643      MCHC    15-FEB-77
;         Fix bug with switch settings of P4, used to indicated an
;         EXE directory entry whould be output in XCMPRL routine.

;644      MCHC    15-FEB-77
;         Don't do JSYS 147(RESET) if EXIT rather than START is requested.
;         This prevent PA1050 to come back into core.
LNK4.DOC                                                       Page 12


;         LNKXIT (TOPS20==1)

;645      MCHC    10-MAR-77
;         While expanding LC to accomodate the symbol table at end
;         and there is no more core (error return from LNKCOR) and no paging yet
;         in LSREQ, page out to disk for the first time.
;         LNKXIT.

;646      MCHC    10-MAR-77
;         Dont touch a high seg page after the high seg is removed in %LOW
;         LNKXIT

;647      MCHC    26-Apr-77
;         Don't clear unneeded memory in LNKXIT (better VM performance)
;         Routines: LNKXIT

;650      JNG     28-Apr-77
;         Use VM on TOPS-10 if available under FTVM.
;         Routines: LNKPAR,LNKLOW,LNKINI,LNKCOR,LNKOLD,LNKLOG,LNKMAP,
;                   LNKERR,LNKOV1,LNKOV2,LNKXIT,LNKWLD

;651      JNG     2-May-77       SPR 10-22609
;         Put the overlay file where the user specifies.
;         Routines: LNKOV1

;652      JNG     13-Jun-77      SPR 10-22456
;         Avoid bad .SAV file when paging to disk.  Much of user's
;         program will be overwritten with some word from the program.
;         Routines: LNKXIT

;653      JNG     13-Jun-77      SPR 10-22957
;         Fix /SYSLIB with an argument.  Broken by edit 457.
;         Routines: LNKWLD

;654      JNG     15-Jun-77      SPR 10-22528
;         Don't lose common block names from local symbol table.
;         Routines: LNKLOD,LNKOLD

;655      JNG/JLd 24-Jun-77      SPR 10-23152
;         Don't print an erroneous module name in the map when the start
;         address is specified with a switch.
;         Routines: LNKWLD

;656      JNG     11-Jul-77      QAR JMF
;         Don't try to supercede an old output file if we find it
;         on the user's library.
;         Routines: LNKFIO

;657      JNG     12-Jul-77      QAR JMF
;         Don't blow up while trying to delete temp files on a fatal
;         error if IO.EMG area doesn't exist.
;         Routines: LNKLOG

;660      JNG     12-Jul-77      QAR DMN
;         Clear all .LINK storage at the end of each overlay.
LNK4.DOC                                                       Page 13


;         Routines: LNKOV1

;661      JNG     13-Jul-77      QAR BLISS-36
;         Make the %LNKMDS message only a warning level (L%W).
;         Routines: LNKLOD,LNKERR

;662      JNG     14-Jul-77      QAR DZN
;         Update NAMPTR in T.776 so block-structured symbol
;         files will work.
;         Routines: LNKOLD

;663      JNG     30-Sep-77      SPR 10-24037
;         Save GS.FR over LNKCOR call in LNK999.
;         Routines: LNK999

;664      JNG     6-Oct-77       QAR Gene Spadi
;         Don't destroy last word of bound globals on /NODE:0.
;         Routines: LNKOV1

;665      JNG     7-Oct-77
;         Fix core management bug with overlays. Broken by edit 650.
;         Routines: LNKOV1

;666      JNG     24-Oct-77
;         Fix edits 650 and 665, this time for sure.
;         Routines: LNKOV1

;667      JNG     25-Oct-77
;         Call correct paging routine to move window way up.
;         Routines: LNKLOD

;670      JNG     25-Oct-77
;         Don't overwrite DY.LNK in core shuffler.