tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCC and "smart" linking


From: Oleg N. Cher
Subject: Re: [Tinycc-devel] TCC and "smart" linking
Date: Fri, 12 Oct 2012 21:01:42 +0300
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Thomas Preud'homme wrote:
Le jeudi 11 octobre 2012 17:06:44, grischka a écrit :
Oleg N. Cher wrote:
Maybe there is a way in TCC to put fucntion Unused to a library, and it
be linked to the target EXE/DLL, if only need?
Sure.  Linking "as needed" is the point of libraries in C and it works
with TCC like with any other C compiler.

To me what he describes look more like the --as-needed of ld but with symbol granularity instead of file granularity. Did I understood correctly Oleg?

An granularity atom (in TCC's libraries) is one object file. If you compile two (or more) 
functions to the one object file, put the object file to a library and you use in your 
program only one of this function (from the library) - both functions will be included to 
your target binary. You must do very small pieces of code, several sources that was 
divided to atoms: functions, variables, etc. And you, of course, can use my tool 
"smartlinkrel" for dividing sources to atoms self-automatically, to be compiled 
to different object files and after this you can include they to the libraries.

If you are interested in the tool 'smartlinkrel', you can read more:

(in Russian):
http://zx.oberon2.ru/forum/viewtopic.php?f=10&t=34
(the same Google-translated to English):
http://translate.google.com/translate?sl=ru&tl=en&js=n&prev=_t&hl=ru&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fzx.oberon2.ru%2Fforum%2Fviewtopic.php%3Ff%3D10%26t%3D34

And you can see here an example of using of the tool 'smartlinkrel':

https://github.com/Oleg-N-Cher/BB-XDev/tree/master/WinDev

The tool is freeware. Written in Delphi and KOL (Key Object Library - 
http://www.kolmck.net/ ).
Sources are open and attached there. If you've questions and/or propositions 
about the 'smartlinkrel', e-mail me.


Oleg N. Cher,
VEDAsoft Oberon Club
http://zx.oberon2.ru




reply via email to

[Prev in Thread] Current Thread [Next in Thread]