lua-users home
lua-l archive

Re: Patchless modification of Lua source code

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


Hi!
On 2018年11月24日 13:04:50 +0100
Viacheslav Usov <via.usov@gmail.com> wrote:
> We have an elephant in the room here, and let me just name it:
> Windows. Once somebody demonstrates similar techniques on Windows, we
> could talk about real-world portability.
For what it's worth, Sean's experiment can be reproduced on MSVC 2010:
 >cl /c main.c
 >cl /c func1.c
 >cl /c func2.c
 >cl /c myfunc2.c
 >lib /out:func.lib func1.obj func2.obj
 >link /out:main.exe main.obj myfunc2.obj func.lib
 >main.exe
 main
 func1
 myfunc2
> First, other libraries that the executable depends on will not have
> been linked statically to the same "replacement" functions, so they
> will have to resort to the "original" dependencies. Your program, as
> whole, may end up using different versions of the same set of
> functions simultaneously.
I've certainly encountered such nasty cases in the past when I was
learning C, but right now I cannot produce such an example that would
also be concise and easy to reproduce. If you have one handy, I would be
glad to test it on Windows, too.
-- 
Best regards,
Ivan

AltStyle によって変換されたページ (->オリジナル) /