DCD & AOF relocation
Julie Stamp (8365) 474 posts |
I have assembler of the form
which objasm (4.08) does not accept. The intention is that Is there a way to write the offset from the image start like this? Alternatively, is there way to just write
and stop |
Julie Stamp (8365) 474 posts |
The plot thickens… To use SharedCLibrary I link with C:o.stubs, but Link will only put the necessary relocations in the RelocCode table if I do
rather than
The latter results in ‘Unknown library chunk’, presumably due to RelocCode not fixing up the stubs. However the former defaults to linking with base &8000, which causes the difficulty from my original post (cannot form Is there a way to force Link to put in the relocations for the SCL stubs, while having base address 0? |
Rick Murray (539) 13840 posts |
I’m a little confused as to what you’re trying to do. Modules are relocatable by definition, so the base address should be, as you note, a calculation from the start. But, then, the header with all the offsets should be the very first thing in the module. Literally you define a label that represents the module start, and the header with all the X – Y stuff directly follows. Next, the use of CLib. In an assembler module? You need to set up the C environment (basically doing what CMHG does). It’s probably a lot simpler to discard the assembler and write the module in C if you want CLib functions….? |
Julie Stamp (8365) 474 posts |
I’ve settled for doing this:
It works nicely actually, you have to make sure that all the assembler code comes before C$$Code for it to work. Also make sure you do _clib_initialisemodule and RelocCorrect in the right order and strictly before any other assembler gets control. |
Stuart Swales (1481) 351 posts |
So long as you don’t want it to go in the ROM… |