[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Patchless modification of Lua source code
- From: pocomane <pocomane_7a@...>
- Date: Fri, 23 Nov 2018 09:51:10 +0100
At my undestanding this is not related to the C standard
On Wed, Nov 21, 2018 at 1:45 PM Viacheslav Usov <firstname.lastname@example.org> wrote:
> This is not true. For example, in C89, clause 22.214.171.124 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, ld-linux-blabla.so 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