lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

At my undestanding this is not related to the C standard

On Wed, Nov 21, 2018 at 1:45 PM Viacheslav Usov <> wrote:
> This is not true. For example, in C89, clause Translation phases, number 8:
> All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation.

Infact, there are 2 translation units in the poposed scenario: one for
the executable, one for the shared library. In both, each symbol is
defined just once.

That references are resolved when the program is loaded in memory for
the execution. So the C compiler/linker/whatever is NOT in charge to
resolve the references. On linux machine, is in
charge, i.e the the os dynamic linker/loader.

Now, I am not saying that the proposed procedure is a good pratice,
neither I am saying it is not. For sure it is not portable... I
mean... some platforms may even not have the support for the shared