title: undefined reference when calling code in downloadable kernel module
body: <p>Following on from a previous question <a href="https://stackoverflow.com/questions/19812080/using-system-symbol-table-from-vxworks-rtp">Using system symbol table from VxWorks RTP</a>.</p>
  
  <p>I am porting an existing vxworks kernel module to an RTP, however, much of the actual functionality is still embedded in other "downloadable" kernel modules. These are loaded using loadModule (as part of the startup process), and so should be in the system symbol table at the point my RTP runs.]</p>
  
  <p>However, I cannot get my RTP to build, getting errors from the linker regarding undefined references.</p>
  
  <p>How can I persuade the linker to ignore references to these functions? I am passing the <code>-Xbind-lazy -non-static</code>  options to the linker.</p>
  
  <p>As an example, the kernel module (built as database.out) might contain code such as </p>
  
  <p><code>void writeDatabaseValue(int , char*);</code></p>
  
  <p>and my RTP application code calls it in the usual way</p>
  
  <pre><code>void main (int)
  {
       //do some stuff
       writeDatabaseValue(0,"foo");  //Linker error here
       taskDelay(100);  //but no linker error here
  }
  </code></pre>
  
  <p>I have tried adding <code>database.out</code> to the link line using <code>-l:database.out</code>, which resolves the reference to writeDatabaseValue, however I then get into dependency hell, as the linker then tries to resolve all of <code>database.out</code>s references, including all of the standard vxworks api calls.</p>
  
  <p>EDIT: Just for extra complication, some of the kernel module code I want to call is in the same module that actually spawned my RTP......</p>