Home

Awesome

pclink11

License: LGPL v3 Build status Build Status CodeFactor

Attempt to port PDP-11 LINKer to PC C/C++ — learning how the linker works, the hard way.

The code (partially) ported from MACRO-11 sources to C/C++. Port source: RT-11 LINK V05.45.

Authors

Status: Work in Progress 🚧

Currently the PCLINK11 links most of test OBJ files properly, but we have some troubles linking tests with libraries.

Usage

The source code is able to compile under Windows (VS2013/VS2015), and also under Linux/MacOS (gcc/clang, use the Makefile).

Command line:

pclink11 <input files and options>

Options (both / and - prefixes are allowed):

Input files and options are space-separated.

Examples:

Testing Strategy

Folder tests contains more than 100 sub-folders with .OBJ files.

First, we use RT-11 simulator written by Dmitry Patronov to produce "etalon" or "original" output files, they renamed with -11 suffix — see !runtest11.cmd command file. Then, we run the pclink11 with to produce "our" output files, they renamed with -my suffix — see !runtestmy.cmd command file and testrunner utility. And finally, we compare "original" files with "our" files, line-to-line or byte-to-byte, using testanalyzer utility.

"Our" MAP files differs in the first line (program name, date/time, no page number), and there's no paging, so no page header lines. SAV/SYS/REL and STB files are binary, compared byte-to-byte, should be no differences. Log files are absolutely different, we're not comparing them, but in "our" log files we're looking for "SUCCESS"/"ERROR" and so on.

TODO

First priority:

Second priority:

Not implemented now, and not sure we will:

Links