title: Glibc link difference causing segmentation fault
body: <p>Something about the server I build on is broken (I am not the only one who uses it...). It is SLES 11 (no SP). I have tried uninstalling and reinstalling gcc, glibc etc with no success.</p>
  
  <p>The problem is my built program seg-faults as soon as it hits a library function such as memset or strlen (note it is the calling of this function and not the function itself, the parameters are fine). I think it is definitely linking wrong and I can prove it is different to how it was with readelf. eg:</p>
  
  <pre><code># readelf -s myprog | grep memset
    247: 081461d0    52 &lt;OS specific&gt;: 10 GLOBAL DEFAULT   27 memset@GLIBC_2.0 (3)
    3530: 081461d0    52 &lt;OS specific&gt;: 10 GLOBAL DEFAULT   27 memset@@GLIBC_2.0
  </code></pre>
  
  <p>vs a previous working version that says:</p>
  
  <pre><code>  69: 00000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.0 (2)
    2035: 00000000     0 FUNC    GLOBAL DEFAULT  UND memset@@GLIBC_2.0
  </code></pre>
  
  <p>Its a fairly standard makefile and nothing has changed. The linker flags are:</p>
  
  <pre><code>LDFLAGS = -L$(companylibrarypath) -lourcompanylibrary -L$(mysql_lib_path) -lmysqlclient -L/usr/tls/ -lpthread -pthread -lz -L$(curl_lib_path) -lcurl -lxslt
  </code></pre>