[cfe-users] Linker Stripping
john.dallman at siemens.com
Mon Oct 14 04:59:49 PDT 2013
> some of my functions which are not used in the final
> executable are optimized away by the clang++ linker.
> Is there any way to prevent clang++ to strip away
> these functions ?
The obvious question first: why is this a problem? If they are not used, why do you need them?
An easy way to keep them around is to create a reference to them, so that they are "used"
in some way. Calls to them, or pointers to them stored in globals, should do the trick.
Siemens Industry Software Limited is a limited company registered in England and Wales.
Registered number: 3476850.
Registered office: Faraday House, Sir William Siemens Square, Frimley, Surrey, GU16 8QD.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users