Re: Weak symbols and inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 Feb 2014, Paul Smith wrote:

The simplest is probably to use asm("other_name_for_new") on a
declaration of new, so it is still visible but with a different
name...

But isn't this subject to the same caveats that using force_inline is?

You mean always_inline? Well, it has the advantage that it doesn't force the function to be inlined ;-)

If I don't include the header file, then the code silently falls back to
the system new/delete.

It shouldn't be hard to check if nm -D yourlib.so contains _Znwm as U, you can add that to the Makefile. Well, if you control the Makefile, you can actually add -include mynew on the command line so it can't be forgotten...

--
Marc Glisse




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux