mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 21:02:26 +00:00
A bit more info about static vs dynamic linking
Some systems support only one.
This commit is contained in:
parent
49cb239730
commit
8cec6b3794
1 changed files with 4 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue