pdp11 loader options

jcp%brl-bmd at sri-unix.UUCP jcp%brl-bmd at sri-unix.UUCP
Mon Jun 13 11:14:23 AEST 1983


From:      J. C. Pistritto <jcp at brl-bmd>

The -n option on the PDP-11 loader is often referred to as
	'write-protected text' loading.  It loads your program in to one
	(1) 16 bit address space, and results in a program that runs with
	both its instruction and data memory management registers, (on machines
	that have both, pointing to the same physical region of memory, just
	that the pages which refer to 'code' are write-protected.  A small
	side effect of this is that since data follows code, the first data
	address in your program will be a multiple of 8192 (bytes), as the
	data is adjusted upward in memory to the beginning of the next memory
	managment register address space, (there are only 8 for the entire
	64kbytes possible).  This means you could actually have a program
	which will load and run correctly without -n that will NOT with -n.
	I have actually seen this happen, and it means your program is\
	getting close the hairy edge.  One note: a '-n' loaded program may
	be run on ANY PDP-11 with memory management, (ie. runs UNIX). This
	is NOT true of a -i loaded program.

The -i option directs the loader to load code and data into two PHSYCIALLY
	DISTINCT regions of memory, which each have their own set of memory
	managment registers when the program is running.  This also means that
	this will NOT work on any machine that does not support the Split I&D
	register sets.  (Ex. PDP-11/23s, PDP-11/34s, PDP-11/60??).  Also,
	it means you get an entire 64Kbytes for code and 64Kbytes, (minus
	the stack), for data.  Also, there are certain functions which may
	not be used in a split I&D program, (on version 6, NARGS was an
	example of this).

Of course, it is not possible to write self-modifying code when either -n or
	-i are specified, (in fact, this is often the purpose of specifing
	them...)
						-JCP-



More information about the Comp.unix.wizards mailing list