PrevChapter 37. Linking Dynamically-Loaded FunctionsNext


It is very easy to build dynamically-loaded object files under ULTRIX. ULTRIX does not have any sharedlibrary mechanism and hence does not place any restrictions on the dynamic loader interface. On the other hand, we had to (re)write a non-portable dynamic loader ourselves and could not use true shared libraries. Under ULTRIX, the only restriction is that you must produce each object file with the option -G 0. (Notice that that's the numeral ``0'' and not the letter ``O''). For example,

# simple ULTRIX example
% cc -G 0 -c foo.c
produces an object file called foo.o that can then be dynamically loaded into Postgres. No additional loading or link-editing must be performed.

Linking Dynamically-Loaded FunctionsUpDEC OSF/1