How to ensure C++ classes don't go missing with -flto?

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

 



This question on Stack Overflow caught my eye:
https://stackoverflow.com/q/54345531/608639 . In the question a
program compiles and links fine without -flto. With -flto symbols go
missing.

One of the classes that go missing is RSAFunction, which performs
exponentiation with a public key. The source code is available at
https://github.com/weidai11/cryptopp/blob/master/rsa.h and
https://github.com/weidai11/cryptopp/blob/master/rsa.cpp.

There does not seem to be anything special about rsa.h and rsa.cpp
from my view of the issue. The header declares the classes, and then
the source file implements the classes.

How does one ensure a class does not go missing when using -flto?

(Is this like implicit template instantiations? Is there a way to
declare it so that it does not go missing?)



[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