[cfe-users] Linker Stripping

Dallman, John john.dallman at siemens.com
Mon Oct 14 05:36:40 PDT 2013

> I want to pass them to libraries later loaded into the application.

> If the global is not used, would the linker be able to optimize
> the global out and in turn optimize the function out again ?

Potentially, but the fix is fairly simple. Create a global that holds pointers to the functions. Have the
code that wants to pass pointers to those functions read the pointers from that global.

However, this begs the question of why the part of your code that currently tries to pass the function
pointers isn't being recognised as referring to the functions in question. How does that code work?

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/4a91c666/attachment.html>

More information about the cfe-users mailing list