[cfe-users] Linker Stripping
Dallman, John
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.
--
John Dallman
-----------------
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...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20131014/812da63e/attachment.html>
More information about the cfe-users
mailing list