Retrieve all the functions in a C++ program
<p>Let suppose we have a C++ program where functions are defined, let's call it <code>input.cpp</code>. </p>

<p>Now, I have another C++ program <code>retrieve.cpp</code> that has to "retrieve" all the functions in <code>input.cpp</code> at runtime (or even its object file, if this can help!). </p>

<p>By "retrieving" I mean obtaining something like <code>std::list&lt;std::string&gt;</code> where each element is the header of the string, or <code>std::list&lt;std::function&gt;</code> or any other similar solution.</p>

<p>Having good performance in this process is important.</p>

<p><strong>WHY I NEED IT:</strong>
In <a href="https://stackoverflow.com/questions/36685492/perfect-hash-function-generator-for-functions">this post</a> I'm trying to map a subset of functions (user defined) to implement a <a href="https://en.wikipedia.org/wiki/Memoization" rel="nofollow noreferrer">memoization</a> framework. As someone suggested in the comment, it could be more performant to map all the functions inside the target program. This question comes from the necessity to enumerate/indexing all the functions inside a program.</p>