<div dir="ltr"><div><br></div><div>Something to play with.</div><div><br></div>I have the beginning of a pdp11 linker to go with the macro11 simh tool. It is in an early version, and many things don't work yet, but it can handle some simple programs, like the hello world program included in the test subdirectory. It needs a lot more work to handle larger, more complicated programs.<div><br></div><div>It is quite limited currently, and has little error checking code, I only coded the parts necessary to build the hello program, but it should be a decent starting point.</div><div><br></div><div>Some limitations include:</div><div>- psects of 256 bytes or less.</div><div>- only handles a few of the relocations (1-4, but not 5-17)</div><div>- only produces an lda or a simh script</div><div>- no common psects</div><div>- only handles rt11 object files</div><div>- does not handle object libraries</div><div>- many more.</div><div><br></div><div>It's part of '<a href="http://github.com/khandy21yo/emutools.git">http://github.com/khandy21yo/emutools.git</a>', in the link11 subdirectory. It is coded in C++, and uses cmake to build. It includes the source of the 'unix archive' linker in this subdirectory, but that one is far from working.</div><div><br></div><div>The documentation is quite lacking at the moment. It only started working right yesterday for my test program.</div><div><br></div><div><br></div><div>~/emutools/link11/test$ ls *.obj<br>hello.obj  putconch.obj<br>~/emutools/link11/test$ ../link11 hello.obj putconch.obj -lda hello.lda<br>:~/emutools/link11/test$ pdp11<br><br>PDP-11 simulator V4.0-0 Current        git commit id: f95ac7dd<br>sim> load hello.lda<br>sim> g<br>Hello world!<br>HALT instruction, PC: 001040 (ADD (R5)+,(R0))<br>sim> exit<br>Goodbye<br></div><div><br></div></div>