<div dir="ltr">I am using RTEMS for university research purpose.<div>I am tring to integrate our C++ applications with RTEMS posix model.</div><div>also, I am using Sparc simulator because I don't have real target at this time.</div>
<div><br></div><div>When I check _Thread_Handler() of cpukit/score/src/threadhandler.c regarding C++ global constructor, _init() is called for sparc.</div><div>When I check _init() object dump file, there is not any implementation code for C++ global constructor as like below;</div>
<div>------------------------------------------------------------</div><div><div>Disassembly of section .init:</div><div><br></div><div>00000000 <_init>:</div><div>   0:<span class="" style="white-space:pre">      </span>9d e3 bf a0 <span class="" style="white-space:pre">      </span>save  %sp, -96, %sp</div>
<div><br></div><div>Disassembly of section .fini:</div><div><br></div><div>00000000 <_fini>:</div><div>   0:<span class="" style="white-space:pre">   </span>9d e3 bf a0 <span class="" style="white-space:pre">      </span>save  %sp, -96, %sp</div>
</div><div><div>------------------------------------------------------------</div><div></div></div><div><br></div><div>I am tring to find how to call C++ global constructor for sparc. I found something in <a href="http://gcc.gnu.org/onlinedocs/gccint/Initialization.html">http://gcc.gnu.org/onlinedocs/gccint/Initialization.html</a></div>
<div><br></div><div>I am tring to add libgcc.a in linking process for calling __do_global_ctors().</div><div><br></div><div>Please could you let me know how to add libgcc.a in RTEMS building environment ?</div><div><br></div>
<div>If this approach is not correct, please let me know correct how-to-do for C++ global constructor for Sparc.</div><div><br></div><div>Best Regards,</div><div>Thomas</div><div><br></div><div><br></div></div>