Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5697
| From | Edek <edek.pieITAKNIECZYTAM@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: efficient function call |
| Date | 2011-05-27 16:17 +0200 |
| Organization | ATMAN - ATM S.A. |
| Message-ID | <irobgv$4rl$1@node2.news.atman.pl> (permalink) |
| References | (2 earlier) <irim81$v8d$1@dont-email.me> <579f855a-ff3b-4e65-a977-9773fb58a07c@e35g2000yqc.googlegroups.com> <irleec$po3$1@dont-email.me> <irllnn$hdq$1@node2.news.atman.pl> <slrnitvaoc.gtj.grahn+nntp@frailea.sa.invalid> |
On 05/27/2011 03:45 PM, Jorgen Grahn wrote:
> So you're saying a file
>
> static int foo() { return 42; }
static... (that justifies my 'almost' - I knew there are are other cases
I forgot about). Static is not exported, is it.
> int bar() { return 69+foo(); }
>
> will never inline foo() if I use g++ with the -fpic option?
> That sounds wrong -- and I cannot repeat it on my system.
>
> tuva:/tmp> g++ -W -Wall -ansi -fpic -O3 -c foo.cc
> tuva:/tmp> nm -C foo.o
Symbols will be present. See -S for bar().
> 00000000 V DW.ref.__gxx_personality_v0
> 00000000 T bar()
> U __gxx_personality_v0
>
> On the other hand, you're saying "/almost/ every non-inline function
> can be replaced during program loading" ... what are the rules for
> this? Or rather, where can I read about it?
LD_PRELOAD, or in general the symbol resolution order is 'first found',
at least for regular symbols.
Example, replacing memcpy:
https://bugzilla.redhat.com/show_bug.cgi?id=638477#c55
Edek
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
efficient function call hamze <hamze60@gmail.com> - 2011-05-24 05:52 -0700
Re: efficient function call Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 09:52 -0400
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-24 18:28 +0000
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-24 11:49 -0700
Re: efficient function call Victor Bazarov <v.bazarov@comcast.invalid> - 2011-05-24 15:07 -0400
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:37 -0700
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-25 10:38 +0000
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 11:08 -0700
Re: efficient function call Dombo <dombo@disposable.invalid> - 2011-05-25 21:38 +0200
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-26 11:44 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-26 15:53 +0200
Re: efficient function call yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-05-27 08:31 +0000
Re: efficient function call Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-27 13:45 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 16:17 +0200
Re: efficient function call Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-27 22:38 +0000
Re: efficient function call Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 16:39 +0200
Re: efficient function call Joshua Maurice <joshuamaurice@gmail.com> - 2011-05-24 14:30 -0700
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:39 -0700
Re: efficient function call hamze <hamze60@gmail.com> - 2011-05-25 00:20 -0700
csiph-web