title: Can a library (.so) dynamically load another library built with a different compiler
body: <p><strong>Summary:</strong></p>
  
  <p>I am having troubles with one library dynamically loading another another and I'm wondering if difference in the compilers is the root cause.</p>
  
  <p><strong>Problem Details:</strong></p>
  
  <p>My application links into libgbm.so which dynamically loads libpvrGBMWSEGL.so and then requests the gbm_backend function. </p>
  
  <pre><code>#libgbm.so
  
  module = dlopen("/usr/lib/libpvrGBMWSEGL.so", RTLD_NOW | RTLD_GLOBAL)
  dlsym(module, entrypoint)
  </code></pre>
  
  <p>When I try to use the symbol provided, it throws a segmentation fault.</p>
  
  <p><strong>Analysis:</strong></p>
  
  <p>libpvrGBMWSEGL.so is provided as a proprietary binary blob. A quick analysis shows that it was build with Linaro GCC 5.3-2016.02</p>
  
  <pre><code>&gt; strings libpvrGBMWSEGL.so | grep GCC
  GCC: (Linaro GCC 5.3-2016.02) 5.3.1 20160113
  </code></pre>
  
  <p>Meanwhile the library libgbm which dynamically calls it was build with Buildroot GCC 6.4.0</p>
  
  <pre><code>&gt; strings libgbm.so | grep GCC
  GCC: (Buildroot 2017.11-git-00884-g7af8140-dirty) 6.4.0
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>Should I expect these two library to be compatible in the manner in which I am using them?</p>