Closed larsbrinkhoff closed 6 years ago
I took a look at SAIL; JOBDAT REL:
It begins with
002002,,000000
Next comes a symbol table. Every symbol is described by five words. Here's an example:
457573,,601127 ;Symbol name in SQUOZE: "JOBSVM"
000000,,000075 ;Symbol value
314201,,176553
004003,,000000
000000,,000000
The first symbol seems to be the symbol table block name or file name.
The table is terminated by a symbol entry that starts with 0. After that comes four words. The first looks like two negative half words. The third is the block name or file name again.
Assembling a simple file titled BARFOO which just defines FOOBAR=1234567
.
FAIL produces this REL file:
OCTAL SQUOZE
002004000000 1O9QJV ;Type 10, local sybols
051301670001 BARFOO
000000000001 0
014544243324 FOOBAR
000001234567 4C%U
707725407662 9D%33H ;Checksum
000602000000 %K18N ;Type 3, code
000000000000
000000000000
777176777777 $6VBU ;Checksum
001001000000 0BK8ZV ;Type 4, program name
051301670001 BARFOO
725476107776 RCI6%$ ;Checksum
MIDAS produces this REL file:
OCTAL SQUOZE
000600000000 %BXLF ;Type 3, code
777200777777 $E%%% ;Checksum
000600000000 %BXLF ;Type 3, code
777200777777 $E%%% ;Checksum
000600000000 %BXLF ;Type 3, code
777200777777 $E%%% ;Checksum
000202000001 CBI70 ;Type 1, loader command
000000000000
000000000000
777576777776 0NFEDD ;Checksum
002004000000 1O9QJV ;Type 10, local sybols
051301670001 BARFOO
000000000000
014544243324 FOOBAR
000001234567 4C%U
707725407663 9D%33I ;Checksum
001001000000 0BK8ZV ;Type 4, program name
051301670001 BARFOO
725476107776 RCI6%$ ;Checksum
There is now a DMCG (DynaMod) document describing the format:
https://github.com/larsbrinkhoff/its-archives/blob/master/dmcg/SYS.03.02.pdf
The format is a sequence of blocks. Each block has a header word, data, and a checksum word.
The header word bits:
The checksum is a one's complement sum of the header word and the data.
Block types:
MIDAS doesn't seem to know about block types 13-21.
STINK 201 knows all SYS.03.02 block types, plus 22-30. But 23-30 are not supported.
I've found at least one feature that MIDAS and STINK know about that's not in that document: extend code 2 in a standard data block can also be used to rename or expunge symbols, depending on the value you pass. See the code in LOCGLO in STINK.
This is documented in DMCG memo SYS.03.02 "STINKING-DYNAL Relocatable Format".
The REL file format as used by MIDAS and STINK is not documented. Presumably it could be reverse engineered by looking inside MIDAS and STINK, but it's not very ovbious where to look.