rtems dynamic library loading

Mihaela Panescu mihaela.panescu at gmail.com
Sun Jul 6 17:06:32 UTC 2014


Many thanks for your help.

This works ok.

Mihaela


On Sat, Jul 5, 2014 at 10:01 AM, Peng Fan <van.freenix at gmail.com> wrote:

>
> Hi,
> Have the problem been resolved?
>
> 2014-07-01 7:01 GMT+08:00 Peng Fan <van.freenix at gmail.com>:
>
> Hi,
>>
>> would you please have a try using rap format? does your elf  file symbol
>> table contain the "puts" symbol?
>> If using rap format, you can use rtems-syms to check it. I am not sure
>> whether your command is right since i did not work on  this for a long
>> time, I just downloaded the source code yesterday, and rebegin do
>> something:)
>>
>>
>> 2014-06-30 20:15 GMT+08:00 Mihaela Panescu <mihaela.panescu at gmail.com>:
>>
>>>
>>> Hi,
>>>  I have a problem load a dynamic library using rtems and rtl.
>>> I have a basic dynamic library which should print "hello" using printf,
>>> but when the library is loaded with dlopen(), the "global symbol nout
>>> found: puts" message is returned.
>>>
>>> I compile the library in a similar way as rtld test:
>>>  arm-rtems4.11-ar -rcs libbasic_math.a basic_math.o
>>> rtems-ra --lib basic_math --output-path ./ --no-stdlibs --cc
>>> arm-rtems4.11-gcc -Wl,-static  -L$(RTEMS_TOOLCHAIN)/arm-rtems4.11/lib -l c
>>>  arm-rtems4.11-ar x libbasic_math.ra
>>>
>>>  rtems-ra is used to convert elf archive file into a rap archive file.
>
>>  I also tried to compile it with:
>>> rtems-ld -o basic_math.elf -O a -n -b dll.exe -e Init --cc
>>> arm-rtems4.11-gcc basic_math.o -L$(RTEMS_TOOLCHAIN)/arm-rtems4.11/lib -l c
>>> , but no luck:
>>>
>>> Can this command run ok?  Would you please try such a command "
> /opt/rtems-4.11/bin/rtems-ld  --base  rtld.prelink  --entry  rtems
>  --lib-path  testcase  --lib  3   --cc
>  /opt/rtems-4.11/bin/arm-rtems4.11-gcc  testcase/4.c.4.o  -o
>  /home/freenix/rtems/rtl/build/arm-rtems4.11-realview_pbx_a9_qemu/testcase/my.rap
>  -Wl,-Bstatic " which is extraced from rtl wscript and will generate a rap
> file.
> I tested the rtl testcases using qemu-system-arm, and all is ok.
>
>
>  Thank you,
>>> Mihaela
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/users
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140706/7fc4ef2d/attachment-0002.html>


More information about the users mailing list