Article View: comp.unix.programmer
Article #3433Re: extern inline
From: Ben Bacarisse
Date: Mon, 22 Jun 2009 22:54
Date: Mon, 22 Jun 2009 22:54
29 lines
2142 bytes
2142 bytes
sinbad <sinbad.sinbad@gmail.com> writes:
> i have a static library "s.a" which will be linked with binary object
> of a.c;
> "s.a" has one extern iline definiton fun(), when i tried to compile
> both s.a and a.c
> with -finstrument-functions option, while linking i am getting
> undefined refrerence
> to function fun(), if i remove the -finstrument-functions option
> everything goes well.
> does "extern inline" and gcc's -finstrument-functions doesn't go well
> together.
The gcc manual says:
"This instrumentation is also done for functions expanded inline
in other functions. The profiling calls will indicate where,
conceptually, the inline function is entered and exited. This
means that addressable versions of such functions must be
available."
Do you have an addressable version of fun in s.a? I would guess you
don't. There will be interactions with other gcc flags the affect
inlining like -gnu89-inline and -std=c99. If making an addressable
version copy is proving difficult, post the full compile command
line.
--
Ben.
Technical Details
Message-ID:
<0.c3dd4687241302d3ba12.20090622235430BST.87prcvkhg9.fsf@bsb.me.uk>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!shaftesbury.zen.co.uk.POSTED!not-for-mailReferences:
<cb455e1f-2793-4463-aa34-f647aae7d6cb@d19g2000prh.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1200bcf240,a5b70c4c9465f8d4 X-Google-Attributes: gid1200bcf240,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!shaftesbury.zen.co.uk.POSTED!not-for-mail From: Ben Bacarisse <ben.usenet@bsb.me.uk> Newsgroups: comp.unix.programmer,gnu.gcc.help Subject: Re: extern inline References: <cb455e1f-2793-4463-aa34-f647aae7d6cb@d19g2000prh.googlegroups.com> Date: Mon, 22 Jun 2009 23:54:30 +0100 Message-ID: <0.c3dd4687241302d3ba12.20090622235430BST.87prcvkhg9.fsf@bsb.me.uk> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.91 (gnu/linux) Cancel-Lock: sha1:U9LcTZkkdxizcYuWdQzdP5N8iKM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 29 Organization: Zen Internet NNTP-Posting-Host: 93cdc749.news.zen.co.uk X-Trace: DXC=gogoW9:MEW?o;L;];WSXh?nok4Z\<mH49hDU:2=XKPk8UTGQ4cMUYM60L4FB;9HCo0a;A<lgE_Vm6BHJUW11W`?2 X-Complaints-To: abuse@zen.co.uk