Trailing-Edge - PDP-10 Archives - bb-d868c-bm_tops20_v4_2020_distr - language-sources/link.rnd
There are 6 other files named link.rnd in the archive. Click here to see a list.
.TITLE LINK.DOC -- Changes from LINK 4(765) to LINK 4A(1220)
LINK.DOC -- Changes from LINK 4(765) to LINK 4A(1220)
August 1979
.B 2
.B 1
.B 1
LINK is the linking loader for the DECsystem-10 and DECSYSTEM-20.  LINK
version 4A is a maintenance release designed to get bug fixes made since the
last release of LINK distributed to the field.  Very few new features are
present, but LINK 4A should be significantly more reliable than LINK 4 when
loading user programs.

LINK 4A supercedes all previous versions.  It runs under all supported monitors,
and has been tested under TOPS-10 6.03A an 7.00, and under TOPS-20 releases 3A
and 4.  All patches published through 21-Aug-79 have been incorporated into

LINK is documented in the LINK Reference Manual.  This manual is available to
DECsystem-10 sites as part of volume 11 of the TOPS-10 Software Notebooks,
or separately as order number AA-0988C-TB.  DECSYSTEM-20 sites can find this
manual in volume 4 of the TOPS-20 Software Notebooks, or it can be ordered
separately as order number AA-4183B-TM.
.HL 2 Changes to LINK

The following sections contain summaries of all externally visible changes
that have been made to LINK since version 4(765).  Refer to the file LINK.PCO
for more information on specific edits.
.HL 3 EXE file generation by default
Previous versions of LINK loaded certain types of programs incorrectly
if the user did not ask for an EXE file with /SAVE.  For example,
programs containing embedded nonexistent pages due to gaps between psect
were loaded with the pages existent, and programs with very low high segment
origins did not load at all.  These problems were all due to LINK's inability
to exit with the user program set up in memory correctly, and they could
all be bypassed by typing /SAVE to LINK.

LINK version 4A will automatically generate an EXE file when programs of this
class are detected.  As part of this change, the old LNKNCL and LNKNCX
messages have been deleted, and LINK will now issue the new LNKPCL or LNKPCX
messages whenever it decides to generate an EXE file on its own.  For more
information, see the PCL and PCX messages in the file LNKMSG.MAN.  This was
edit 1146 to LINK, PCO 10-LINK-264.
.HL 3 The .HIGH_. Psect
Declaring a psect with the name .HIGH_. is now equivalent to declaring a
high segment via REL block type 3 (the MACRO HISEG or TWOSEG pseudo-ops).
This provides a convenient mechanism for mixing psect and high segment
code in the same MACRO source file, since you can now put
the high segment code into
the .HIGH_. psect.  This was edit 1155 to LINK, PCO 10-LINK-271.
.HL 3 Loading Large Programs
LINK now catches attempts to load programs that extend beyond location
777777, and issues the new LNKPTL message.  Previous versions of LINK
got various internal errors if this occurred.  This was edit 1204 to
LINK, PCO 10-LINK-293.
.HL 3 Searching FORLIB
LINK will now search SYS:FORLIB.REL in /SEGMENT:LOW mode when loading
FORTRAN program, unless the program is being loaded in /OTS:NONSHAR
mode.  This allows subroutines in FORLIB to be written with two segments
without forcing FOROTS to be read in at load time.  This was edit 1200
to LINK, PCO 10-LINK-289.
.HL 3 Symbol table differences
LINK 4A generates a slightly different runtime DDT symbol table than its
predecessors, which may lead to differences detected by FILCOM if old and
new EXE files loaded with symbols are compared.  The differences are as
.le;The module length of the module PAT._. is now set up just like all other
modules.  This will show up as the left half of some word in the symbol table
changing from zero to 777774.
.le;Psect names are no longer put into the runtime symbol table as empty
modules.  This will make the runtime symbol table generated by LINK 4A
somewhat smaller than that generated by previous versions of LINK for
programs that use psects, since the word pairs that represented the psect
names will be missing.
This was edit 1127 to LINK, PCO 10-LINK-250.
.HL 3 High segment code in overlays
LINK 4A does not allow any high segment code when loading into an overlay.
If it sees any, it will issue the new LNKHCL message.  Previous
versions of LINK allowed this without complaint, but then proceeded to
generate a non-working EXE file.  This is a common error, since it is
what happens if a COBOL program compiled with /R is loaded into an
overlay. This was edit 1115 to LINK, PCO 20-LINK-9.
.HL 3 /OTS:NONSHAR by default
In addition to the reasons listed on page D-39 of the LINK manual, LINK
version 4 assumed /OTS:NONSHAR if the low segment exceeded 256P in size
at the time system library searching started, since the OTS cannot be
read in at 400000 at runtime if the low segment extends beyond that
address.  With LINK 4A, this check has been extended so that /OTS:NONSHAR
is assumed if the low segment extends beyond 330000.  This allows for
the low segment to grow somewhat as a result of system library searching
without causing high segment overlap.

The principle result of this edit is that some large user programs may
now be loaded with the appropriate OTS built in, even though they were
built to bring in the OTS at runtime with previous versions of LINK.  If
this is objectionable and the program's low segment does not extend beyond
400000, the /OTS:SHARE switch can be used to override the default action.
This was edit 1131 to LINK, PCO 10-LINK-252.
.HL 3 /NOINCLUDE, changes to /INCLUDE
There is a new switch, /NOINCLUDE.  This switch turns off include mode set
by a previous /INCLUDE switch seen in a global context.  Unlike /INCLUDE,
the new /NOINCLUDE switch takes no arguments.

The /INCLUDE switch has also been changed to always set include mode for
the rest of the line when it is seen in a global context.  This change
restores the behavior of /INCLUDE from LINK 3A and earlier.  The switch
was changed in LINK 4 to only set include mode for the rest of the line
if it was seen in a global context, and had no arguments.
This was edit 1117 to LINK, PCO 10-LINK-242.
.HL 3 CPU type conflict checking
The routines in LINK that process modules built for a certain type of
CPU (with /KA or /KI to FORTRAN, or .DIRECTIVE KA10, KI10, or KL10 to
MACRO) have been generalized to understand the KL10 declaration, and to
allow for future CPU types.  As part of this change, the LNKKIA message as
been changed to the LNKCCD message, and the CPU types that the
loaded program will run on are now printed in the map.  This was edit
1120 to LINK, PCO 10-LINK-243.
.HL 3 Change to /UPTO
The /UPTO_: switch will now take a global symbol as an argument.  The symbol
does not need to be defined when the switch is typed, but must be defined
by the end of the load.  If it is not, LINK will issue the new LNKUUA message
and ignore the switch.  This was edit 1175 to LINK, PCO 10-LINK-286.
.HL 3 Size of overlay files
Due to a bug, LINK version 4 wrote overlay files that were considerably
larger than those written by LINK 3A.  This bug has now been fixed, so
overlay files written by LINK 4A are comparable in size to those written
by LINK 3A.  This was edit 1205 to LINK, PCO 10-LINK-294.
.HL 3 Generated module name
If any symbols are defined before a module has been loaded, LINK 4A will
start a module of the same name as the symbol.  Previous versions of LINK
just dumped the symbol to the map and runtime symbol table with no preceeding
module name.  If some module has already been loaded, LINK 4A will continue
to append the symbol to the last module loaded, just as previous versions of
LINK did.  This mainly affects symbols defined with switches (/SET, /DEFINE),
and can only happen if /NOINITIAL is used, since the module JOBDAT is normally
loaded by default.  This was edit 1143 to LINK, PCO 10-LINK-263.
.HL 3 Change to REL block type 24
With LINK 4A, REL block type 24 just declares a new psect.  Under previous
versions of LINK, this REL block also took the actions of REL block type 22,
so that any following low segment code went in to the psect just declared.
This was edit 1137 to LINK, PCO 10-LINK-259.
LINK 4A contains a new JOBDAT symbol, .JBEDV.  This symbol will be used in
future releases of TOPS-10 and TOPS-20 in exec mode only for communication
with EDDT and other indepenently-built exec routines.  This was edit 1151
to LINK, PCO 10-LINK-267.
LINK 4A no longer leaves PA1050 in memory on /SAVE/EXECUTE.  PA1050 is still
left in on /EXECUTE (this is a known problem).  As part of this edit, several
of the messages generated during the final phase of LINK have been cleaned up,
and long forms of the messages have been added.  This was edit 1144 to LINK,
PCO 20-LINK-11.
.HL 3 Global definitions of psect names
For each psect loaded, LINK will automatically generate a global
symbol with the same name as the psect name, and with the psect
origin as its value.  With LINK 4A, the psect name will now be
suppressed to DDT typeout.  This was edit 1157 to LINK, PCO 10-LINK-273.
.HL 3 Symbol Names as Switch Arguments
LINK now requires symbols typed as arguments to those switches that accept
symbol names to begin with a letter or special character.  Previous versions
of LINK allowed the first character to be a digit.  This was edit 1167 to
LINK, PCO 10-LINK-280.
.HL 3 Error Message Changes
Several of LINK's messages have changed as the result of an error message
cleanup project.  The most noticeable difference is that most of LINK's
errors will now print the module and file being processed when the error
occurred, but there are many other minor changes.  Most of LINK's messages
were affected by this edit in some way.
The file LNKMSG.MAN contains an updated version of the error message
portion of the LINK manual (Appendix B).  We recommend using this file
instead of the LINK version 4 manual for documentation on LINK's messages,
since so many of them have changed since LINK 4 was released.

The error message cleanup was edit 1174 to LINK, PCO 10-LINK-285.
.HL 2 Changes to the overlay handler

The following sections contain summaries of all externally visible
changes that have been made to OVRLAY (the runtime overlay handler) since
version 4(37).  Refer to the file OVRLAY.PCO for more information on
specific edits.
.HL 3 Changes to RUNOVL and REMOVL
The manual call subroutine REMOVL has been changed to only accept one
argument: the name (or number) of the top link to be removed.  OVRLAY
will remove this link and all of its inferiors from memory.  REMOVL has
also been changed to not allow the caller to remove itself, a check which
was documented but not implemented.

The manual call subroutine RUNOVL has been changed to allow the caller to
be overlaid.  The documentation stated that this was legal, but OVRLAY did
not permit it.

These changes were edit 43 to OVRLAY, PCO 20-OVRLAY-5.
.HL 3 JSYS names changed
The JSYS names used in the TOPS-20 version of OVRLAY have been changed to
be the new name% form that will be present in release 4 of TOPS-20.  This
change was made because JSYS names are global symbols, and the TIME and SIN
JSYSes in the overlay handler were conflicting with FORLIB subroutines of
the same name.  This was edit 41 to OVRLAY, PCO 20-OVRLAY-3.
.HL 3 Symbol table pointer update
The TOPS-20 version of OVRLAY has been changed to keep DDT's symbol table
pointer (@770001) up to date whenever it brings in or removes a link and the
corresponding symbol table.  Before this change was made, bringing in a link
would cause DDT to lose some or all of the program's symbol table.  This was
edit 40 to OVRLAY, PCO 20-OVRLAY-2.
.HL 3 Overlay files in SFDs
The TOPS-10 version of the overlay handler will now attempt to obtain the
path in which to find the overlay file by issuing GETTAB UUOs, which can
return the entire path, including SFDs.  If the necessary GETTABs are not
implemented, LINK will continue to use the path information left in the
ACs by the monitor.  This was edit 46 to OVRLAY, PCO 10-OVRLAY-20.

The following list includes all known problems with LINK as of 31-Jul-79.
The list is divided into two parts. The first is a list of those
bugs for which a solution is not currently known. These will
be fixed roughly in order of their importance, and the patches published
in the appropriate Software Dispatch. The second part is a list of those
problems for which there are no current plans to fix. These are restrictions
in the product.
.HL 2 Problems to be fixed in the near future
.le;When LINK cannot find an input file, it does not always clear typeahead
before asking the user to provide the correct file spec.
.le;LINK will leave PA1050 in memory on TOPS-20 if program execution is
requested.  This happens on the @DEBUG or @EXECUTE commands, or on /EXECUTE
to LINK.
.LE;Loading TOPS-10 DDT.REL version 40(220) specifying /ONLY:HIGH
results in an illegal memory reference. This is indicative of
several problems with /ONLY.
The check of R.TWSG in the routine CHKSEG is incorrect.
.LE;Erroneous LNKUGS messages sometimes result when using /ONLY.
This happens because LINK sometimes checks a RADIX-50 symbol as if it
were an address to determine the segment.
An example of this is building the Fortran compiler.
.LE;/BACKSPACE does not skip over the file mark after backspacing
a magtape. This leaves the tape incorrectly positioned.
.le;The LNKIMM message does not increment .JBERR, nor does it use
LINK's internal message facility. Thus, it cannot cause a load
to fail if some included modules were missing, nor be controlled by the
usual LINK message switches.
.LE;/SET:.HIGH_. sometimes results in erroneous LNKRUM messages.
This happens because the switch routine destroys P1.
.Le;The LNKDNS message has various problems. The offending switch
is not ignored if the message is fatal, nor does the message get printed
when it should.
.le;The handling of /DDEBUG:(MACRO,FORTRAN) is inconsistent.
.LE;The /NOENTRY_: switch assumes that the symbol specified is not
an inter-link entry point. If another link does reference this symbol
then the program being loaded will fail at runtime.
.LE;/USERLIB:(x,y,z) does not work.
.le;TTY:/MAP:NOW when loading an overlaid program does not work.
LINK should call in LNKOV2 in this case.
.LE;/CPU:x is ignored. Also, it only takes a single CPU type
as its argument when it should take a set of allowed CPU types.
.le;The T.1 routine (and many others) uses P2 incorrectly. It
should be the last location desired, but is sometimes set up
as the first free instead. Common side effects are that location 777777
cannot always be loaded, or that LINK reads in too many pages from its
overflow files.
.le;LINK has some problems putting the .EXE file in the proper place.
If an ersatz device was specified to /SAVE, and LINK must
overflow the HC area to disk, then the .EXE file may
end up on the wrong path. Also, if /EXECUTE was specified,
then LINK looks only on the user's default path or connected
directory, in spite of any contrary specification to /SAVE.
.le;The LNKLNS message does not print a carriage-return
line-feed at the end of the line.
.LE;LINK does not accept commands on the monitor command line, as
.lm+5.b;_.R LINK (commands) or @LINK commands
.LE;/LINK when specified in a global context has problems.
The S.DEBG code from edit 730 should be reworked.
.LE;/SET specified without an argument results in the LNKISN message.
.LE;The /NOREQUESTS_: switch does not accept the complete radix-50
character set.
.le;The /SEVERITY_: switch takes an octal argument, but should take
a decimal one to be consistent with /ERRORLEVEL_: and the LINK manual.
.le;Defining a common block with the name of .COMM_. does not result in
a definition of blank common.
.le;On TOPS-20, overlay plots are generally 2.54 times too large.
This arises because most TOPS-20 plotters think metric, but LINK still
thinks English.
.LE;The LNKARL message is much too long. It and perhaps some others
should be cut up into several lines.
.HL 2 Problems for which no solution is currently planned.
.le;If code or data that contains fixups (external, Polish, inter-psect
references, etc.) is overwritten at load time, LINK can get an illegal
memory reference or go into a loop.  This can happen if psects overlap,
or if LOC or RELOC statements are used incorrectly in a MACRO program.
This is a restriction.
.LE;Generation of a symbol file via /SYFILE_: requires that symbols
be loaded with the program. This is a restriction.
.le;LINK does not read SWITCH.INI on a LOAD-class command.
This is a SCAN restriction.
.le;On TOPS-20, logical names pointing to files do not work.
This is a restriction.
.HL 2 TOPS-10

To install LINK version 4A on your system, copy the files LINK.EXE,
LNK???.EXE, and OVRLAY.REL from the distribution tape to SYS:, and then
copy the file LINK.HLP from the distribution tape to HLP:.  Note that
all of LINK's EXE files must be on the same disk structure.

The batch control file LINK.CTL contains all necessary instructions to
assemble and load LINK, and to produce listings and storage maps.  It will
normally have to be modified slightly to correspond to the installation
.HL 2 TOPS-20

To install LINK version 4 on your system, copy the files LINK.EXE and
OVRLAY.REL from the distribution tape to SYS:, and then copy the file
LINK.HLP from the distribution tape to HLP:.  This can be done by
mounting the tape labelled Distribution Tape on MTA0_:, then typing
the following commands:
.B 1;.NF;.NJ;.LM +5
DSK*:<*>OVRLAY.REL (TO) SYS:*.*.-1, -
DSK*:<*>LINK.HLP (TO) HLP:*.*.-1
.LM -5;.F;.J

To rebuild LINK from sources, mount the tape labelled Distribution Tape
on MTA0_:, then type the following commands:
.B 1;.NF;.NJ;.LM +5
RESTORE DSK*:<*>*.*.* (TO) <self>*.*.*
!At this point, you should TYPE LINK.CTL to see what it does.
.F;.J;.LM -5

The batch control file LINK.CTL contains the procedures necessary to rebuild
LINK and OVRLAY from sources.  It may have to be modified slightly to
run at your installation, so you should type it to see what it does
before typing the SUBMIT command above.
.HL 2 Changes to LINK

All changes made to LINK 4(765) to produce LINK 4A(1220) are summarized
Refer to the file LINK.PCO for more detailed information on specific edits.
.B 2
.TS 9,17,25,33,41,49,57,65
766	MCHC	17-MAR-78
	Store correct KL code(offset calculated by JFFO) for inconsistancy
	check of modules to come.

767	MCHC	17-MAR-78
	Clear AC P2(required size) when coing forced dump of LC area,
	which returns through LNKCOR and will cause looping if
	garbage is in it.

770	MCHC	17-MAR-78
	Add code to allow paging for the first time in routine to
	output undefined symbols(especially if undefined symbol table
	does not begin at end of a chunk of code.)

771	MCHC	23-MAR-78
	Fix bug in doing large( > 400000) pop loop in 2 chunks.

772	MCHC	23-MAR-78
	Edit 770 did not adjust start of symbol table that came after
	the undefined symbol table.
	If /SET:FOO:nnnnnn/SYMSEG:PSECT:FOO is used so that a psect
	was created just for the symbol table, the following should
		.JBUSY (117)/	-U,,PAT..+100 
				where U is the length of undefined symbol table
		.JBSYM (116)/	-L,,PAR..+100+U
				where L is the length of the symbol table

773	JNG	30-Apr-78
	Fix GSDLT in LNKXIT to not leave some area's UB
	pointing beyond .JBREL if the GS area is already gone.
	Routines: LNKXIT

774	JNG	30-Apr-78	SPR 10-25711
	Fix bad calculation of UW in EXE file writer.
	Routines: LNKXIT

775	DZN	1-May-78	SPR 20-11396
	Make sure /DEBUG:FORTRAN loads the starting address of
	FORDDT and not the user's program (unless explicit /START).
	Routines: LNKWLD

776	DZN	4-May-78	SPR 10-23733
	Fix address check and lost .JBVER when loading small programs
	with /SAVE and no data in core-image pages 0 or 1.
	Routines: LNKXIT

777	DZN	18-May-78	SPR 10-24008
	Fix allocation of COMMON blocks when a COMMON block is first
	referenced but not defined, then later defined. Also document
	SY.RF as destroying P1-P4.

1000 to 1077	Reserved for Development.

1100	DZN	23-May-78	SPR 10-24042
	Fix LNKMAP to correctly free the index blocks it uses for sorting,
	to keep the integrity of the DY area.
	Routines: LNKMAP

1101	JNG	29-May-78	SPR 10-23623
	Fix LINK to correctly load indexed libraries that contain modules
	which have no entry points and thus do not appear in the index
	when indexed with MAKLIB.

1102	DZN	18-Jun-78	SPR 20-11085
	Fix paging routines to detect moving a window past 512P. In this
	case, make the end of the window set right at 512P.
	Routines: LNKLOD

1103	DZN	19-Jun-78
	See that the list of .REQUEST/.REQUIRE blocks is not freed twice,
	to preserve the integrety of the DY area.
	Routines: LNKLOD

1104	JNG	20-Jun-78
	Fix address checks when dumping LC or HC area to disk.  Remove
	edit 750 in LH.DMP, so we will never try to shrink the current
	area by more pages than the area has.
	Routines: LNKCOR

1105	JNG	20-Jun-78
	Fix edit 740 to not destroy an AC that held the input file's PPN.
	This caused LINK to not be able to find a file when the user gave
	an explicit path including SFDs.
	Routines: LNKFIO

1106	JNG	27-Jun-78	QAR RDH
	Update HL.S1 from RC.CV of the highest PSECT loaded at the end of
	loading.  This causes the EXE file generator to allocate all of
	the pages that it should if the last PSECT ends with a BLOCK statement.
	Routines: LNKLOD

1107	MCHC	3-Aug-78
	Fix bug in .SETEX--routine to expand RC.TB and RC.NTB tables
	in DY area by obtaining bigger spaces, copying the data from
	the old tables, and freeing the old table spaces.
	The bug was in address calculation in freeing one of the tables.
	The code is re-arranged to do a DY.GET followed by DY.RET
	then another DY.GET and DY.RET

1110	MCHC	7-Aug-78
	Type out the PSECT name as part of the error message when a
	non-existent one is used with /SYMSEG in GETSST routine.
	Don't clear the name from memory cell, loop back without restoring the
	stack and treat this case as a default case.

1111	MCHC	7-Aug-78
	Fix LNKXIT core management bug introduced by edit 772.

1112	JNG	15-Aug-78	SPR 10-25902
	Fix one off bugs in map printing segment lengths in K/P and
	words free.

1113	DZN	25-Aug-78	SPR 20-12001
	Fix memory management problems when plotting the overlay
	tree. See that LINK never shrinks back on TOPS-20 until final
	placement of the loaded program. Add LNKPOT message to tell user
	when LINK is plotting the overlay tree.

1114	DZN	1-Sep-78	SPR 20-11999
	Zero count of COBOL symbol words and ALGOL OWNs loaded when
	done loading a module, so they don't get counted in subsequent
	modules in the same file.

1115	DZN	2-Sep-78	SPR 20-11997
	Add LNKHCL message to complain when loading high segment code
	into a link other than the root in an overlaid program.

1116	JNG	7-Sep-78
	Put back part of the code removed by edit 716.  Performance
	improvements are only kosher as long as the code removed is
	Routines: LNKLOD

1117	DZN	14-Sep-78
	Make /INCLUDE:args also set include mode, as it did long ago.
	But also add /NOINCLUDE to turn off include mode but not
	delete the original args.

1120	DZN	22-Sep-78	SPR 10-26135
	Fix CPU mismatch checks so that they work. Remove edit 766,
	revamp all CPU check code to use a bit mask of valid CPUs,
	delete the LNKKIA message and add LNKCCD, and change the
	map to include the correct information. Also, make the map
	show which CPUs the entire program can be run on.

1121	JNG	4-Oct-78	QAR JMF
	Fix LNKXIT bug so .JBSYM ptr won't include the undefined symbol
	table.  This was broken by edit 772.
	Routines: LNKXIT

1122	DZN	5-Oct-78	SPR 10-26222
	Remove edit 740, which attempted to use SCAN's /VERSION switch,
	rather than LINK's. SCAN's switch is a file-specific switch, which
	is not the way LINK wants it to work. However, still fix the original
	problem (having to type /VERSION to 6 characters to work) by making
	LINK's /VERSION switch unique to any abbreviation.

1123	DZN	10-Oct-78	SPR 10-26580
	Use HRLI instead of HRL to load ENTER error flag.
	Routines: LNKFIO

1124	DZN	11-Oct-78	SPR 10-26712
	Edit 636 broke LINK's ability to be run execute-only. Fix
	this by making the TTY log routine once more return into the
	potentially execute-only high segment properly.
	Routine: LNKINI

1125	JNG	1-Nov-78	SPR 10-26379
	Don't try to run the high segment file on /SAVE/RUN (or /SAVE/DEBUG)
	when generating an EXE file.  This fixes ?nnnLHC.EXE not found when
	the user types the above switches and the HC area has overflowed.
	Routines: LNKXIT

1126	JNG	1-Nov-78	SPR 10-26433
	If all 7.01 GETTABs to determine where we came from are not available,
	use the contents of the ACs to do GETSEG UUOs.
	Routines: LNKINI

1127	JNG	14-Nov-78	QAR DIB
	Set up the module length for PAT.. in the runtime symbol table.
	Routine: LNKXIT

1130	DZN	26-Jan-79	SPR 10-27212
	Make LINK honor /MAXCOR correctly when a request for memory in a
	pagable area is made. In this case, edit 650 made LINK count the
	memory request toward the /MAXCOR value, even though the window
	can simply be moved.
	Routine: LNKCOR

1131	DZN	26-Jan-79	SPR 10-27123
	Make LINK decide to load a non-sharable OTS if the low segment
	has grown within 40 pages of the origin of the OTS high segment
	rather than letting the low segment grow past it first.
	Otherwise, the low segment may cross the beginning of the OTS
	during the system library search when it is too late to fix it.
	Routine: LNKLOD

1132	JNG	30-Jan-79	SPR 10-26576
	Re-work EXE file writer to fix several problems, including:
	. PSECTs above the high segment not written properly.
	. Absolute code not loaded correctly.
	. Bad EXE directory if loading overlays and small /SPACE switch.
	. PSECT attributes not written into the EXE file.
	. Page 1 written into page 0 if page 1 is lowest page containing code.
	. Address checks when writing the EXE file.
	. Bad EXE file if EXE directory is longer than two pages.
	. ?LNKCNW or bad DDT symbol table when loading PSECTs.

1133	JNG	30-Jan-79	SPR 10-26576
	Add a long message for the LNKSTL message.
	Routine: LNKERR

1134	JNG	30-Jan-79	SPR 10-27024
	Avoid address check in LNKXIT while writing EXE file if lowest
	code loaded is between 2000 and 377777, but the program being
	loaded is not so large that LINK needs to overflow to disk.
	This edit is an extract of part of edit 1132.
	Routines: LNKXIT

1135	DZN	31-Jan-79	SPR 10-26792
	Force PG.SU to expand anyway if a request crosses a page boundary
	and the window is not at least two pages long.
	Routine: LNKLOD

1136	JNG	31-Jan-79	SPR 10-26518
	Avoid IO to unassigned channel in LNKXIT while writing an EXE file
	if segment ends on last word of a page and LINK is not paging to disk.
	This edit is an extract of part of edit 1132.
	Routine: LNKXIT

1137	JNG	1-Feb-79	SPR 20-12411
	Don't change RC.CUR in T.24.  Also set default PSECT name to left-
	justified .LOW. (not right-justified) if name not given in block.
	Routine: LNKOLD

1140	JNG	6-Feb-79	SPR 10-26410
	Clear LSTSYM when a non-loaded local is encountered.
	Routine: LNKOLD

1141	JNG	15-Feb-79	SPR 10-26290
	Make the EXE file writer stop writing when it passes the size
	of the user program, instead of writing the entire LC area.
	This edit supercedes edit 1136 and is an extract of edit 1132.
	Routine: LNKXIT

1142	JNG	16-Feb-79
	Fix problems with multiple /SET:.HIGH.s introduced by edit 1132.
	Routine: LNKWLD

1143	JNG	16-Feb-79	QAR CKS
	Make sure symbols never get into the LS area before a module name.
	If they try (/NOINITIAL/SET), dummy up a module name from the symbol.
	Routine: LNKLOD

1144	DZN	16-Feb-79	SPR 20-12473
	Clean up code to run the .EXE file so that PA1050 is not left in
	memory on TOPS-20, and so that more of the final messages use .ERR.
	instead of OUTSTRs.

1145	DZN	22-Feb-79
	Load local symbols and store symbol table pointers on TOPS-20 if
	/DEBUG:DDT and leaving program in memory. Broken by edit 1144.

1146	DZN	8-Mar-79	SPR 10-26290
	Change the 'Not enough core to load' message to 'Program too complex'.
	Then cause more cases to force .EXE file generation (e.g., PSECTs above
	high segment, gaps between PSECTS).

1147	JNG	12-Mar-79
	Avoid bad EXE file if lowest location loaded is above 400000, LINK
	is overflowing to disk, and lowest location loaded was not the first
	location loaded (i.e., load was not monotonic).
	Routine: LNKXIT

1150	DZN	14-Mar-79	SPR 10-27632
	Make LOGINI in LNKINI.MAC use standard LKNFIO routines to set up the log
	file, so that the default path of a log file is preserved over the
	Routine: LNKINI

1151	JNG	29-Mar-79
	Add the new Job Data Area location .JBEDV to the initial symbols.
	Routine: LNKINI

1152	JNG	3-Apr-79
	Get EXE file right when loading overlays.  Broken by 1132.
	Routines: LNKOV1, LNKXIT

1153	JNG	12-Apr-79	QAR JBD
	Give LNKIPX message if a Define PSECT block (type 24) contains
	an invalid PSECT index.
	Routine: LNKOLD

1154	JNG	12-Apr-79	QAR JBD
	Re-write T.23 to fix the following problems:
	. Don't re-define the PSECT indices in terms of the order of block 23s.
	. Don't require a name of zero in the first block 23.
	. Don't do a set PSECT (block type 22) action on block type 23.
	. Expect PSECT index instead of name in first word (name still works).
	Routine: LNKOLD

1155	JNG	13-Apr-79	QAR JBD
	Allow PSECT .HIGH. to be synonymous with TWOSEG.

1156	JNG	13-Apr-79	QAR JBD
	Relocate the breaks in block type 5 with respect to .LOW.
	every time, even if the current PSECT is not .LOW..
	Routine: LNKOLD

1157	JNG	13-Apr-79	QAR DZN
	Suppress the PSECT name global symbols to DDT typeout.
	Routine: LNKWLD

1160	JNG	14-Apr-79	QAR TW/JMF
	Don't put junk in runtime undefined symbol table for symbols
	that are used in Polish blocks.
	Routine: LNKXIT

1161	JNG	4-May-79	SPR 10-27727
	Clean up Psect printout in map.
	Routines: LNKSUB, LNKMAP.

1162	JNG	4-May-79	SPR 20-12825
	Set up DDT's symbol table pointers on /DEBUG/SAVE.  This edit is
	an extract of edit 1144.
	Routines: LNKXIT

1163	JNG	8-May-79	QAR DC
	Never mark .HIGH. as relocatable, since we default its origin.
	This was broken by edit 1155.
	Routine: LNKWLD

1164	JNG	8-May-79	SPR 10-27598
	Don't overwrite the first page of the FX area when writing a map
	if the LS area is paging and the last piece of the area exactly
	fits into the window.
	Routine: LNKMAP

1165	DZN	15-May-79	SPR 10-27925
	Zero LSTSYM whenever a call to SY.RLS says a symbol requested for symbol
	table fixup was not the last symbol loaded. This prevents  symbol  fixup
	requests from finding a long-obsolete symbol in LSTSYM that just happens
	to match.

1166	JNG	15-May-79
	Don't allow PSECT indices in Polish blocks unless the first halfword
	was the default PSECT index for the block.
	Routine: LNKOLD.

1167	JNG	17-May-79	QAR 10-3081
	Don't allow symbols typed as switch arguments to begin with digits.
	Routines: LNKSCN

1170	JNG	23-May-79	SPR 10-27945, QAR 10-3070, 10-3087
	Fix some memory management problems in LNKXIT when not writing an
	EXE file.
	Routine: LNKXIT

1171	JNG	30-May-79	QAR 10-3049
	Fix edit 1146 to say LNKPCL even on TOPS-10 if it doesn't like
	the PSECT attributes.

1172	JNG	5-Jun-79
	Fix many memory management problems when writing a runtime symbol
	table, especially when psects are involved.

1173	JNG	10-Jun-79
	Update RC.HL on /COMMON.
	Routine: LNKWLD

1174	DZN	10-Jun-79	SPRs 20-12548, 20-12244, QAR 10-03199
	Revamp all error messages.
	. Label  all messages with E$$xxx:: or Ennxxx:: so messages can be found
	  when debugging. E$$xxx should be  the  label  of  the  .ERR.  (or  its
	  preceeding  PUSH  P,[channel])  that  defines  the  .ERxxx text block.
	  Ennxxx should be the label of all other .ERR.s with the same  assigned
	  mnemonic, with nn starting at 01.
	. Include the module and file name in which an error was detected in all
	  applicable messages.
	. Make  .OERR.  synonamous  with OUTSTR for use in place of .ERR. when a
	  message must be printed with an OUTSTR, so that all such messages  can
	  be found easily.
	. Make  the  list  of  messages  and  long text in LNKERR and the actual
	  messages in LINK agree.
	. Fix log device being a terminal other than the controlling one.
	. Clean up the wording of all messages to be more consistent.
	Routines: All

1175	JNG	12-Jun-79
	Fix /START and /UPTO with symbols as arguments.

1176	JNG	12-Jun-79
	Disallow /SYMSEG:PSECT:name with /OVERLAY.
	Routine: LNKWLD

1177	JNG	12-Jun-79
	Make /VERSION in global context not lose local switches.

1200	JNG	13-Jun-79
	If loading reentrant FOROTS, search SYS:FORLIB/SEGMENT:LOW.
	This is required for FOROTS version 6 and later.
	Routine: LNKLOD

1201	JNG	13-Jun-79
	Disallow /SEGMENT:PSECT, which worked because it used the same
	keyword table as /SYMSEG.

1202	JNG	14-Jun-79
	Fix /VERSION after 1172, and make LINK assemble on TOPS-20
	after edit 1174.

1203	JNG	14-Jun-79
	Add support for Extended FORTRAN.

1204	JNG	14-Jun-79
	Check for programs that extend beyond location 777777, and
	issue the LNKPTL message.

1205	JNG/DZN	14-Jun-79	SPR 10-27954
	Re-claim some wasted blocks in .OVL files.
	Routine: LNKOV1

1206	JNG	14-Jun-79
	Fix a NO.COR in LNK999 that edit 1174 missed.
	Routine: LNK999

1207	JNG	29-Jun-79
	Make the LNKCMX message continue loading, so the user can run
	the program if he wants to.
	Routine: LNKLOD

1210	JNG	29-Jun-79
	Allow 1-word block type 5's, so SAIL output will load.  Also
	allow a program break of exactly 1,,0 (bypass the LNKPBI check).
	Routine: LNKOLD

1211	JNG	29-Jun-79	QAR 10-3303
	Fix typo in LNKDRC message, avoid Illegal UUO.  Broken by 1174.
	Routine: LNKWLD

1212	DZN	4-Jun-79
	Fix various typos and other loose ends in the aftermath of 1174.

1213	JNG	5-Jul-79
	Eliminate the ISD message; on multiple partial definitions, just
	ignore them if their values agree, and give the MDS message if
	they don't.

1214	DZN	9-Jul-79	QAR 10-03315
	Fix mismatched angle brackets so PIP's /V switch doesn't complain.
	Comments should not contain angle brackets unless they actually
	terminate conditionals, repeats, etc.

1215	JNG	23-Jul-79	QAR R.ACE
	Use RC.HL for .ABS. and .LOW. for LOWLOC update at CHKLLC, since
	RC.CV may not be correct.  In particular, RC.CV for .ABS. is always
	Routine: LNKLOD

1216	JNG	23-Jul-79	QAR CKS
	Preserve P1/P2 in SYMOUT, avoid illegal memory reference if
	undefined symbols exist.
	Routine: LNKXIT

1217	DZN	25-Jul-79
	Clean up the listings for release. Update all copyright notices.
	Remove all editing lines. Break pages in good places.
	Routines: All

1220	DZN	24-Aug-79
	Release on both TOPS-10 and TOPS-20 as version 4A(1220).
	Routines: All

.HL 2 Changes to OVRLAY

All changes made to OVRLAY 4(37) to produce OVRLAY 4A(50) are summarized
Refer to the file OVRLAY.PCO for more detailed information on specific edits.
.B 2
.TS 9,17,25,33,41,49,57,65
40	DZN	15-Sep-78
	On TOPS-20, if DDT exists, set its internal symbol table pointer
	whenever we change .JBSYM.

41	DZN	5-Oct-78
	Use new NAME% form of JSYS names to avoid conflicts with user-defined

42	DZN	5-Oct-78
	Change FTENEX conditional to TOPS20 to be consistent with the rest
	of LINK. Use proper mnemonics for JSYS arguments. Some code cleanup.

43	DZN	13-Oct-78
	Fix link deletion problems. Make REMOV. take only a single argument,
	and delete that link and all of its inferiors (otherwise lost links
	result). Allow RUNOV. to delete the calling link as documented. Also
	remove OVLAOC message (use OVLARC instead).

44	DZN	15-Oct-78
	Fix argument checking for calls to manual subroutines. This involves
	allowing all double and single precision argument types to work,
	making the OVLIAT message fatal and not type junk, and getting
	the correct user PC (see edit 10).

45	DZN	15-Oct-78
	Fix PDL overflow if many calls to RUNOV. RUNOV. now unbinds back
	through the return PC on the stack, allowing replacement of links
	at the same level to succeed without the PDL overflow.

46	JNG	15-Jun-79
	Try GETTABs to determine the full path that we were run from on

47	DZN	25-Jul-79
	Clean up the listing for release.

50	DZN	27-Aug-79
	Release on both TOPS-10 and TOPS-20 as version 4A(50).


The following suggestion list has been accumulated from various sources,
including SPRs and DECUS sessions.  The appearance of a suggestion on
this list  does not necessarily mean that DIGITAL ever intends to implement
.le;Search REL_: for system libraries if they cannot be found on SYS:.
.le;Print an informational message when searching a system library, giving
the number of undefined symbols remaining when the search starts.
.le;Implement relocatable psects.
.le;Support long symbols.
.le;Support a better symbol character set than RADIX-50.
.le;Support extended addressing.
.le;Load programs into another fork on TOPS-20.
.le;Modify LINK to be callable as a subroutine from other programs.
.le;Make LINK use the same message convention as SCAN. In particular,
make LINK recognize SCAN's /MESSAGE switch.
.le;Sort the symbols listed in LINK's map files.
.le;Use a better free memory algorithm. Currently, LINK uses a best-fit
method. This is known to be inferior, potentially slowing LINK down.
Another result is that many one-word blocks are always on the
front of the free memory list, making debugging of memory management
problems very painful.
.LE;Use virtual memory more intelligently. In particular,
don't zero memory just allocated via CORE or PAGE_. UUOs, since
it is already zero.
.le;Redesign the structure of the title REL block (block
type 6) to allow easier upward compatibility of CPU types.
.le;Print appropriate error messages if conflicting or inappropriate
psect properties are detected, such as concatenate and overlay.
.le;Implement block type 11 code bits in the symbol store operator.
.le;Make overlaid psects and common blocks coexist. Other DIGITAL loaders
actually handle common blocks as overlaid psects. One advantage would be
that the largest common block declaration would not necessarily have to
be loaded first.
.LE;MACRO and LINK should use some facility (perhaps the proposed
REL block types 1042 and 1043) to allow full file specifications in
library requests embedded in .REL files. Such an implementation
should preferrably use text rather than SIXBIT fields as are now
.le;Make the overlay plotter code able to write an LPT format
file to the disk. This would allow printing with non-default parameters,
for instance.
.le;Make the LNKUGS message print something more informative than
a 0 as the value of a polish expression.
.LE;Add KS10 to the CPU specifications allowed both in MACRO
and LINK.
.LE;DEBLNK (the multi-segment debugging version of TOPS-10 LINK) does
not work. There are some remaining MOVE ['LNKERR']s that should be
.le;The code implementing the /ESTIMATE and /MAXCOR switches
should be placed under off conditionals on TOPS-20, since
these switches only exist on TOPS-10.
.le;All references to RUNCOR should be removed, since the switch has
been removed.
.le;Add an initialization macro to all of LINK's sources that searches
all of the necessary universal files and does other setup. Currently,
it is very painful to add a new universal file to the list.
.le;LNK999 (the TOPS-10 emergency memory manager) appears broken. There
are problems when running LINK with small virtual limits. This might
be a TOPS-10 7.00/7.01 problem.
.le;The handling of block type 776 (symbol files) is very strange and needs
to be cleaned up.
.B 2
[End of LINK.DOC]