RE: [Dev-C++] Linker :: Under the hood.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-05-28 09:00:04
|
When they are inlined, they are not linked. The compiler throws in suitable assembler instructions directly. When the inline function isn't inlined - because it is too large etc - normally all source files that saw the inline declaration will get a "common" code block with the function code. The function then works as any other function with the extra feature that the linker doesn't complain if multiple object files specifies the function. The linker just selects one instance of the function and throws away the other instances. /Per W On Fri, 28 May 2004, Siva Chandra wrote: > > Hello all, > > That was insightfull but also lead to another > question. > How do inline functions get linked? > > Siva Chandra > > --- Damien A <g_...@ho...> wrote: > > --------------------------------- > > > "ld (and therefore gcc) is sensitive about the order > in which libraries and object > files are specied on the command line. If libfoo.so > depends on libbar.so, you > must specify libfoo.so first (as counterintuitive as > this may be). The reason is > that ld keeps track only of unresolved symbols as it > links. If libfoo.so and > libbar.so depend on each other, one of the libraries > will have to be specified > twice (for example, -lfoo -lbar -lfoo)." -Programming > Linux Games , pg 33 > > > > > > __________________________________ > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger. > http://messenger.yahoo.com/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |