Sujet : Re: C23 thoughts and opinions
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 08. Jun 2024, 02:14:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v40b9s$29vsj$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
User-Agent : Mozilla Thunderbird
On 08/06/2024 01:39, Kaz Kylheku wrote:
On 2024-06-07, bart <bc@freeuk.com> wrote:
It's you who can't get your head around the idea that someone could be
away with a 'linker'.
You can do away with linkers and linking.
But it's pretty helpful when
1. the same library is reused for many programs.
You use a shared library.
2. you're selling a library, and would like to ship a binary image of
that library.
You ship a shared library.
Without linkage, you don't have a library ecosystem.
Of course you do. Eg. a program depends on the vast WinAPI; but you don't have to ship copies of all its DLLs, neither do you have to statically link them.
There are some fixups involving even with using dynamic linking. That's taken care of by the OS loader. But the code involved isn't extensive. Here is an 800-line C program:
https://github.com/sal55/langs/blob/master/runmx.cthat loads a private executable format of mine; it loads any dynamic libraries also in the same format (but it doesn't multiple instances with other processes); and it resolves any symbols from dependent DLLs. Then it runs the program.
(Here written using WinAPI calls.)