See answers below.
On Mon, Oct 14, 2013 at 8:59 PM, Dallman, John <[email protected]>wrote: > > 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? > I want to pass them to libraries later loaded into the application. > > > 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. > If the global is not used, would the linker be able to optimize the global out and in turn optimize the function out again ? Thank you Trent > > > -- > > 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. >
_______________________________________________ cfe-users mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
