This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Relocatable module

I would like to create a C-code module that will contain several functions.
It should be R/W and R/O independent and at the beginning it should contain
a table which will hold offsets of the contained functions relative to the
table start. This way I can load the module into an arbitrary RAM location
and call functions indirectly through that table. I tried several approaches,
but never managed to get it linked without errors...

regards

Dejan

Parents Reply Children
  • I am quite familiar how C-copmilers work and ss I said, my module does not
    call any external functions nor CRT routines (linker would complain).

    Anyway, I've solved the problem by adding small ASM interface module and
    now it passes linking and works as supposed. I just thoughgt that it can
    be possible to code it entirely in C...

    regards

    Dejan