Commit Graph

39 Commits

Author SHA1 Message Date
Shamus Hammons 8e049701be Fix for bug #191, thanks to jagmod for the report. 2022-08-16 12:30:52 -05:00
Shamus Hammons ea99cb44af Version bump for latest commits. 2022-08-15 21:32:36 -05:00
James Jones 0d71dcf002 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.
2022-08-15 21:31:44 -05:00
Shamus Hammons a63bf68077 Version bump for last commit. 2022-08-15 21:28:33 -05:00
James Jones 304cdee3e0 Add Alcyon C object file support
Support ingesting the DRI Alcyon C object file
format in addition to a.out object files. The load
file routine simply translates the Alcyon object
file into an a.out file before passing it on to
the existing processing workflow.

The motivation here was to enable linking of the
binary-only cinepak decompression GPU routines
provided in the developer files. ALN can handle
these files just fine, and now RLN can too.

However, that is a very simple object files To
fully exercise the relocation table translation
code, contrived assembly files with all types of
relocations were assembled as Alcyon C object
files using MADMAC and BSD/a.out object files
using RMAC (Note RMAC had to be used to generate
the a.out files because MADMAC generates invalid
a.out relocations for certain relocation types
that it handles fine in Alcyon format), and then
both object files were linked as COFF executables
using RLN. The resulting COFF files were verified
to be identical.
2022-08-15 21:27:58 -05:00
Shamus Hammons f63e6b2da1 Version bump for latest patches. 2022-08-15 21:24:39 -05:00
ggn cc23da7a6e Fix for #190, thanks to jagmod for the report 2022-08-15 21:19:32 -05:00
Shamus Hammons a839b5e1b4 Update to the name (don't ask), and copyright dates. Now at v.1.7.0. 2021-03-07 16:50:58 -06:00
Shamus Hammons 459661e27f Fix for bug #132 (warnings for non-exclusive options).
Thanks to LinkoVitch for the report; now at v1.6.4.
2020-02-28 17:57:27 -06:00
Shamus Hammons bd10a921a7 Fix to test to see if include paths actually exist.
RLN will now yell at you if you give it an include path that doesn't
exist.  Thanks to ggn for the idea!  :-)
2020-02-28 16:54:05 -06:00
Shamus Hammons fd9ba5f319 Forgot to bump the version. Now at v1.6.2. 2020-02-28 16:16:05 -06:00
Shamus Hammons 822fb0b235 Added fixups for OP data addresses.
This is the counterpart to the RMAC Object Processor assembler. In order
for it to be useful, we need to be able to address things in the OP
sections that refer to 68xxx TEXT and DATA sections--so now that's
possible with a little tweak to the section relocator. Now at version
1.6.1 (we forgot to commit 1.6.0, sorry!).
2018-02-26 20:37:05 -06:00
Shamus Hammons 2b769046eb Patch to properly handle WORD sized symbol relocations by SainT.
Version now at 1.5.2.
2017-10-04 09:31:20 -05:00
Shamus Hammons 05f3a96e41 Fix for -n and -l flags. Thanks to C. Forhan for reporting. 2016-06-14 13:25:45 -05:00
Shamus Hammons 9ab479822c Major cleanup of codebase (removal of unnecessary cruft).
Any time you can throw away code is a good time; we've had a very good
time lately. :-) Mainly removed redundant structures that were bolted on
to the codebase, most likely by persons who didn't have the slightest
clue how the thing worked. That's gone now, and hopefully from here on
out, things will start to get *much* cleaner.
2015-12-07 22:24:50 -06:00
Shamus Hammons ed794c04e7 Revbump for last commit. :-P 2015-12-07 08:27:25 -06:00
Shamus Hammons cf65d78a03 Should be final fix for bug #36. :-P 2015-12-06 19:40:21 -06:00
Shamus Hammons 52b539ef19 Forgot revbump for last commit. :-P 2015-11-28 14:02:45 -06:00
Shamus Hammons a0c533714d Version # bump, as the last change was more than just a patch. :-) 2015-11-26 08:23:57 -06:00
Shamus Hammons ef0a4c2b77 Possible fix for bug #36.
Also, fixed a lot of misconceptions vis-a-vis the common symbol vs. the
external, and symbol table type definitions. There's still a ways to
go, but now we're on the right track.
2015-11-25 22:39:34 -06:00
Shamus Hammons 5c7a0db5a2 Fix for bug #37 (Wrong values in data symbols when linking mult. files)
Thanks to SCPCD for the patch! Also, revbump to v.1.3.6.
2015-09-03 07:48:15 -05:00
Shamus Hammons 1614b4cc59 Changed wording of warning to be more clear to end user. 2015-02-03 08:37:00 -06:00
Shamus Hammons 65c5194d32 Allow linking to internal symbols _TEXT_E, _DATA_E, & _BSS_E.
Also, added -u (allow unresolved symbols) flag. Probably doesn't work as
expected; it may go away in the future.
2015-01-26 09:23:02 -06:00
Shamus Hammons 4635567e96 Fix for bug that scribbled randomly on symbols.
Whenever there was a symbol collision, the DealWithSymbol() function
would, under the right circumstances, write $0800 into a symbol for no
good reason. This has been fixed. Also fixed the realloc() nonsense
that was written incorrectly as well.
2015-01-22 11:48:48 -06:00
Shamus Hammons 5644d37956 Fix for crash on Win32.
Need to address the underlying problem, for now this is just a quick fix.
2014-12-24 12:42:17 -06:00
Shamus Hammons 3e667b86e2 This Time For Sure :-P
The data structures in RLN are pretty piss poor in places, and likely
that way because of whoever had this code before just bodged in a bunch
of code to make it work they way they wanted it to. Trying to reverse
course on that score. :-)
2014-12-20 11:06:52 -06:00
Shamus Hammons 8cffb87a80 And now we have proper lazy linking of AR (*.a) archives.
The code probably needs some more cleanup, but now it's in much better
shape than it was before.
2014-12-19 10:55:40 -06:00
Shamus Hammons 062df8602b Added preliminary ar (*.a) archive support. 2014-12-15 11:49:54 -06:00
Shamus Hammons a1f6a3912c Patch to accept gcc objects submitted by ggn. 2014-12-11 08:32:52 -06:00
Shamus Hammons f60139df3c Fixed bug with absolute globals not being relocated properly. 2014-01-15 22:22:28 -06:00
Shamus Hammons a9928b064f Fixed warning that did not respect -w flag. 2014-01-14 12:06:18 -06:00
Shamus Hammons caa7d37ad5 Fixed bug with iscommon() macro. 2014-01-14 11:53:48 -06:00
James Hammons 741d94dd19 Clean up of path_tail() function; now uses defined path delimiter. 2011-12-29 17:13:33 +00:00
James Hammons 4d8573013a Reverted changes made to utter failure in the header. :-) 2011-12-29 16:00:52 +00:00
James Hammons 7748e5d517 Moar cleanups, fixing basic types to use C99 standard types. 2011-12-29 15:18:15 +00:00
Graeme Hinchliffe e1ddda6e40 Fixed the broken linking action for symbols who shared the same 8 initial characters in their names. Culprit was symcmp (wacky define in rln.h) which was just WRONG. Removed the define, and replaced with good ole strcmp in lookup().
LinkoVitch
2011-12-29 15:05:04 +00:00
James Hammons d35d0e7e98 Added more verbosity to reloc_segment(). 2011-12-29 09:39:32 +00:00
James Hammons ff28769b66 More cleanups. 2011-12-28 09:59:18 +00:00
James Hammons ef2a73f70f Initial commit. 2011-12-26 17:38:55 +00:00