[GSOC]Dynamic object file loading:basic working version
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Jul 9 19:57:17 UTC 2009
Good job!
Random questions:
+ unload_library isn't implemented yet in the linker.c
+ does the loaded library get a call to initialize itself?
+ will you need some help getting a comparable demo
application on RTEMS?
+ The code uses at least pthread_mutex. This means that
it will require POSIX to be enabled in RTEMS. Is this the
only thing forcing RTEMS POSIX thread support to be
enabled? [NOTE: I don't know if this is a big deal or not.
at this point, it is just a requirement on the code.]
+ Is this really as self-contained as it looks? :-D
And can you update the google docs page that has
the general SoC Status for all RTEMS projects? If
I didn't send you permission, just ping me and I
will add you.
--joel
JiSheng Zhang wrote:
> Hi all,
> Now basic symbol resolving and relocation works! The code is attached.
> For test just make and then ./demo -l ./t.o -s get. If you should see
> something like "******5******" plus various debug message.
> Explanation:
> t.c looks like this:
> /*****************/
> int ttt=5;
> int get()
> {
> return ttt;
>
> }
> /****************/
> so t.o should have at least one relocation and two symbols. readelf -S
> t.o and readelf -s t.o prove this.
> the dynamic linker load t.o and parsing it, then it loading all needed
> sections, finally it will do symbol resolving and relocation.
>
> For test I just point entry to the start of ".text" that is get
> function, then call this function via entry, we should get the
> result:5
>
> TODO next week:
> 1.lookup external symbol which is exported by demo
> 2.support symbol resolving exported by object file which is dynamic loaded
>
> Regards,
> JiSheng
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list