[GSOC]Dynamic object file loading:basic working version
JiSheng Zhang
jszhang3 at gmail.com
Thu Jul 9 19:34:48 UTC 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objdl.tar.gz
Type: application/x-gzip
Size: 9972 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20090710/71c4b08a/attachment.bin>
More information about the users
mailing list