<div dir="ltr"><div><div><div><div>Hello,<br><br></div>I followed the instructions Chris posted on using WAF to make a TAR object file and linked it to my program. But when I run it, I get "file not found" error. I'm using SPARC SIS.<br><br></div>Here is my waf script:<br>import rtems_waf.rtems as rtems<br><br>def init(ctx):<br>    rtems.init(ctx)<br><br>def options(opt):<br>    rtems.options(opt)<br><br>def configure(conf):<br>    rtems.configure(conf)<br><br>def build(bld):<br>    rtems.build(bld)<br>    <br>    rtems.root_filesystem(bld, 'dl',<br>        ['init.c',<br>        'hello.c'],<br>        'dl.tar', 'dl-tar.o')<br><br><br><br></div>And here is how I untar the object in my Init task and load the dynamic object, which should print "Hello":<br>...<br>extern int _binary_dl_tar_start;<br>extern int _binary_dl_tar_size;<br><br>rtems_task Init(<br>  rtems_task_argument ignored<br>)<br>{<br>  int (*hello)();<br><br>  int te = Untar_FromMemory((void *)(&_binary_dl_tar_start),<br>                        (size_t)(_binary_dl_tar_size));<br></div>  /* error checking. omitted here. */<br><br><div>  void* handle = dlopen ("/hello.o", RTLD_NOW | RTLD_GLOBAL);<br>  if (!handle)<br>  {<br>    printf("dlopen failed: %s\n", dlerror());<br>    exit(1);<br>  }<br>...<br><br></div><div>What am I doing wrong? Using <i>objdump</i> and <i>nm</i> I didn't find ANY occurrence of <i>hello </i>in the final executable file.<br></div><div><br></div><div>Best Regards,<br></div><div>Saeed<br></div></div>