[TUHS] Work I've done with a PDP-11 simulator

John Cowan cowan at mercury.ccil.org
Tue May 13 05:50:46 AEST 2014


Noel Chiappa scripsit:

> The C compiler is linked with the -n flag, which produces pure code. What
> the linker documentation doesn't say (and I never realized this 'back in the
> day') is that when this option is used, it rounds up the size of the text
> segment to the nearest click (0100).

Yeah, that makes sense.  Without -n, the .data segment starts right at
the top of .text, but you can't do that if you are going to share
.text but not .data.  So it's painless to round up the size of .text
so that .data starts at a memory protection boundary.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan at ccil.org
Historians aren't constantly confronted with people who carry on
self-confidently about the rule against adultery in the sixth amendment to
the Declamation of Independence, as written by Benjamin Hamilton. Computer
scientists aren't always having to correct people who make bold assertions
about the value of Objectivist Programming, as examplified in the HCNL
entities stored in Relaxational Databases.  --Mark Liberman



More information about the TUHS mailing list