[Scummvm-devel] dynamic plugins again
yotam barnoy
yotambarnoy at gmail.com
Mon Aug 31 06:05:08 CEST 2009
Thanks for your reply Marcus
> 1. It looks like the plugin files are built relocatable, but not position
> > independent, correct? The reason I think this is because there is no code
> in
> > the DC loader to deal with a Global Offset Table.
>
> Correct. This is the purpose of the "-q" flag to ld; it produces a
> binary which still contains relocation records.
OK I missed that flag. I guess I just assumed it meant quiet, which is what
it does for gcc. I forgot it could have different meaning for ld.
> Unless you compile with -G0, you'll probably need to set up the global
> data pointer as well.
>
Right. I deal with that by placing the short segments of the plugin into a
hole created around the global pointer of the main executable.
I also had to add --whole-archives to the main executable which I later saw
that you did as well.
Great to know I'm on the right track :)
Thanks again,
Yotam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090831/e2e5ca15/attachment.html>
More information about the Scummvm-devel
mailing list