[Bug 270989] print/ghostscript10: adds libgs.so; connects to USES and DEFAULT_VERSIONS facilities; flavorized

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 25 Apr 2023 15:54:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270989

--- Comment #18 from Michael Osipov <michael.osipov@siemens.com> ---
Chad for clarification what the library loading is about in C in general and
what GS does, this will make it eaiser to understand for you:

1. Static linking: all object code is part of the runtime image (executable)
which may result in a huge file (done all at link time)
3. Dynamic linking: executable points to a shared library, executable is small
and loader at start time loads the library into memory (may or may not share
between other executions), make it replaceable anytime and you don't need to
relink your executable
3. loading at runtime: You have a well defined directory full of shared
objects, you use dlopen() to load them at runtime and well defined entry
points. Exactly what Apache HTTP Server is doing with modules. Same here:
./base/gp_unix.c:    if ((handle = dlopen(buff, RTLD_NOW)) != 0) {

Current setup with GS 10: static linking, after point 1 it is dynamic linking
BUT the device drivers are statically integrated into the dynamic library
libgs.so, thus not loaded at runtime. GS9 and below do "loading at runtime"
which is not deprecated by Artifex that is why Debian doesn't do this anymore.

I hope this helps!

PS: It is a bit confusing ;-)

-- 
You are receiving this mail because:
You are the assignee for the bug.