This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Optimizing constructors/destructors for embedded systems


> 2) If they are not virtual, unused variants of the destructor should go
> away by means of function-level linking (on gcc by compiling with
> -ffunction-sections and linking with --gc-sections).
I tried it, but applying the option --gc-sections results in an empty 
executable file. Am I missed something? Without it everyting works in the 
known way.
BTW I wanted to try what happens if those functions are virtual and the 
mentioned options are used. I know that using virtual functions have its 
cost, but I don't know its couple to the operator delete(). Of course I will 
avoid using them as far as it is possible, but I want to know their behavior.

Regards
Gyorgy Kovesdi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]