From 8cec6b37948d07359c857d65f55e313731b911ba Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Fri, 11 Oct 2019 17:41:45 +0100 Subject: [PATCH] A bit more info about static vs dynamic linking Some systems support only one. --- doc/Compiling.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/Compiling.md b/doc/Compiling.md index abeaf6c2..ebb84ce9 100644 --- a/doc/Compiling.md +++ b/doc/Compiling.md @@ -57,11 +57,13 @@ The following options designate the main module: | Compiler option | Use | | :-------------: | --------------------------- | -| ```-m``` | Generate loadable binary using dynamic library loading (on systems that support it). | -| ```-M``` | Generate loadable binary with all library references statically linked. | +| ```-m``` | Generate loadable binary using dynamic library loading (*see note*) | +| ```-M``` | Generate loadable binary with all library references statically linked (*see note*) | For a main module, no .sym or .h files are generated, and the C compiler is called with additional parameters to generate the execututable binary, linking the object files needed for imported modules. +*Note:* not all systems support both static and dynamic linking: some support only static; some support only dynamic. When a system only supports one, ```-m``` and ```-M``` behave the same. + ### Separate compilation Each module may be compiled by a separate command line, although the imports of a module must be compiled before the module is compiled. All three generated files (.sym, .c and .h) must be retained at least until all modules dependent on this module have been compiled.