[Top][All Lists]

[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 (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):
(the same Google-translated to English):

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


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

reply via email to

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