Simple question about RTL

Pavel Pisa ppisa4lists at pikron.com
Sun Sep 4 13:10:43 UTC 2016


Hello Tim Tian,

On Sunday 04 of September 2016 14:52:44 xuelin.tian at qkmtech.com wrote:
> This problem drives me crazy.
>
> I can use dlopen to load my object file, this part works fine. When I loaded the object file, it showed something like:
> > handle: 0x2a9bb0 loaded
>
> And then I could get the address of this handle via dlsym,
>
> > call = dlsym(handle, "hello_world");
> > if (call == NULL) {
> > printf("dlsym failed: symbol hello_world not found\n");
> > return 1;
> > }
> > printf("address: %x\n", call);
>
> it said like:
> > address: 2aa3a1
>
> But, when I continued to jump to the entry point of call, the system
> crashed.

what is the RTEMS sources version?

I have tested RTL on Zynq about last week and it worked correctly.
I use actual RTEMS master git sources.

If you use RTEMS build before next patch then it is highly probable
that you experience failures on stargets with cache enabled.

  libdl/rtl-obj.c: synchronize cache after code relocation.
  Pavel Pisa<pisa at cmp.felk.cvut.cz>
  7/21/16 2:35 AM

There is even another patch which synchronizes and cleans cache during startup

  arm/xilinx_zynq: ensure that cache is cleaned and MMU disabled when initialization starts.
  Chris Johns<chrisj at rtems.org>
  Pavel Pisa<pisa at cmp.felk.cvut.cz>
  8/31/16 4:49 PM

It should not be crucial for UP (non SMP) use. But it would worth
to retest your actual RTEMS master version.

If you are working with stable RTEMS 4.11 pre-release branch
then problems are not fixed there.

I think that it would worth to consider whole cache related
issues update for 4.11 branch as well.

Best wishes,

               Pavel





More information about the users mailing list