title: dlsym and parameter checking
body: <p>I'm writing a plug-in application in C and I'm using dlopen/dlsym to load dynamically the "implementation" of some functions. For example I have the following pointer to a function</p>
  
  <pre><code>struct cti_t* (*create)() = 0;
  </code></pre>
  
  <p>And I load the implementation using the following code:</p>
  
  <pre><code>plugin_handle = dlopen ("xxx.so", RTLD_NOW);
  //error checking
  
  create = dlsym(plugin_handle, "cti_create");
  //error checking
  
  //call create for the specific implenetation
  struct cti_t *dev = create();
  </code></pre>
  
  <p>The "plug-in" defines the cti_create in the following way</p>
  
  <pre><code>struct cti_t* cti_create(int i) {
     printf("Creating device lcl");
         //do somenthing with i
     return &amp;lcl_cti;
  }
  </code></pre>
  
  <p>So it defines one integer parameter, but everything works without errors. The question is: is it possible to make some argument type verification when the symbol is loaded with dlsym? How can I enforce that the symbols loaded have the signature I expect?</p>