Thread View: comp.unix.programmer
2 messages
2 total messages
Started by sinbad
Mon, 22 Jun 2009 19:31
extern inline
Author: sinbad
Date: Mon, 22 Jun 2009 19:31
Date: Mon, 22 Jun 2009 19:31
14 lines
1645 bytes
1645 bytes
hi, 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. thanks
Re: extern inline
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads