]> Shamusworld >> Repos - rln/commit
Convert output symbol table back to a table
authorJames Jones <atari@theinnocuous.com>
Tue, 26 Jul 2022 10:36:50 +0000 (03:36 -0700)
committerShamus Hammons <jlhamm@acm.org>
Tue, 16 Aug 2022 02:31:44 +0000 (21:31 -0500)
commit0d71dcf00270f75a7692c788e2834e47231780ef
tree5f38c1d20fcfafe4ab43cdef32e8741692859182
parenta63bf6807773cdcf9d5660bab8e0bc97645cf8b1
Convert output symbol table back to a table

It looks like at some point the output symbol
was converted from an actual table of SYMREC
structs to an in-memory copy of a COFF/a.out
symbol table. This entailed relying on the
assumption that all symbols had an entry in the
string table when using OSTLookup()'s return
value as anything other than a boolean value,
as is done in the relocation procesing logic.

In preparation for adding support for debug
symbols, which often have no string table entry,
revert to using an intermediate output symbol
table representation and serializing it one symbol
at a time when writing the output file. This
simplifies various code paths, but potentially
slows down writing COFF symbol tables to disk.
Fortunately, this table is not written with
default options, and is rather small unless
using debug symbols, so this shouldn't
significantly affect the runtime of most
existing use cases.
rln.c
rln.h