Not sure what part of this doesn't work, this isn't my field of expertise, but it seems like what's needed is an internal loader/linker...

1: Add link_library() as first instruction of fpc for unix
2: Link_Library:
- list of external libraries and function names, with their associated offset in program code
- replace code bytes with found library offsets

I've barely worked with unix yet, but i seem to remember that loaded code is in writable memory pages, so that should (could?) work. Or at worst... i once did a scripting engine that would use fpc to compile the script to a dll, would then load the dll in user memory (not using dll functions) and manually patch the offsets. I'm quite sure something like this could be done...

I don't have much time right now, but in a couple of months i'll likely join the fpc cross compile effort since i'll need it for a major project next year and delphi... just doesn't deliver outside of windows...

ps: not related at all but i wanted to make a new account since this is an old nick i don't really use but when i create an account i get kicked out with no error messages and a non working "new" account... an ideas??