Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are correct in that glibc uses symbol versioning. If you are curious, the symbol versioning implementation introduced in glibc 2.1 is described <a href="http://people.redhat.com/drepper/symbol-versioning" rel="noreferrer">here</a> and is an extension of Sun's symbol versioning scheme described <a href="http://download.oracle.com/docs/cd/E19253-01/817-1984/appendixb-45356/index.html" rel="noreferrer">here</a>.</p> <p>One option is to statically link your binary. This is probably the easiest option.</p> <p>You could also build your binary in a chroot build environment, or using a glibc-<em>new</em> => glibc-<em>old</em> cross-compiler. </p> <p>According to the <a href="https://web.archive.org/web/20110208085632/http://www.trevorpounds.com/blog/" rel="noreferrer">http://www.trevorpounds.com</a> blog post <a href="https://web.archive.org/web/20160107032111/http://www.trevorpounds.com/blog/?p=103" rel="noreferrer"><strong><em>Linking to Older Versioned Symbols (glibc)</em></strong></a>, it is possible to to force any symbol to be linked against an older one so long as it is valid by using the the same <em><code>.symver</code></em> pseudo-op that is used for defining versioned symbols in the first place. The following example is excerpted from the <a href="https://web.archive.org/web/20160107032111/http://www.trevorpounds.com/blog/?p=103" rel="noreferrer">blog post</a>.</p> <p>The following example makes use of glibc’s realpath, but makes sure it is linked against an older 2.2.5 version.</p> <pre><code>#include &lt;limits.h&gt; #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; __asm__(".symver realpath,realpath@GLIBC_2.2.5"); int main() { char* unresolved = "/lib64"; char resolved[PATH_MAX+1]; if(!realpath(unresolved, resolved)) { return 1; } printf("%s\n", resolved); return 0; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload