title: How to alias C library functions?
body: <p>I have a static C library that I can build with different compile time options (e.g. _BUILD_SMALL, _BUILD_FAST).  It has a function</p>
  
  <pre><code>void Foo(void);
  </code></pre>
  
  <p>I would like to use a single instance of a benchmarking tool to benchmark the "small" and the "fast" versions of the library.  I don't want to use .dlls.</p>
  
  <p>How can I link to the "small" and the "fast" libraries and alias the function names so I can call the small version and the fast version.  Ideally it would look something like:</p>
  
  <pre><code>void benchmark(void)
  {
    FAST_Foo();
  
    SMALL_Foo();
  }
  </code></pre>
  
  <p>More information:</p>
  
  <p>The library can be built with different optimizations options -Os versus -O3.  Also, the algorithms vary slightly (i.e. cached values vs looking up values always).  I want to compare the size vs speed tradeoffs of the different versions.  I'd like the unit tests and benchmarking to be ran on both versions of the library the easiest way possible.</p>