@CodeSmith
if you use -fPIC, the resulting binary will have a GOT (and PLT), however, you don't need -fPIC for anything else but shared object files. Althought the AmigaOS 4.0 ELF files are EXE's, they still contain the relocation tables so they can be loaded at any position.
In theory, the -fPIC wouldn't even be needed for the shared object files as they are implemented right now, however, the GOT and PLT are used like some sort of "phone book" and as such also resolve global symbols that use late/lazy binding - if you have e.g. an unresolved "printf" in your program, the PLT contains a stub that does the run-time lookup and jumps to the right "printf", even if the object has been loaded with dlopen. In that respect, AmigaOS shared objects behave just like UNIX shared objects. _________________ Seriously, if you want to contact me do not bother sending me a PM here. Write me a mail |