DLD and linker scripts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DLD and linker scripts

Wolfgang Dann
It would be fine if the DLD could handle linker scripts,
or at least would generate an appropriate error message.

In Debian and Gentoo libncurses.so is such a script.

At the moment this happens in stable gst:

st> PackageLoader fileInPackage: 'NCurses'
"Global garbage collection... done"
Loading package NCurses
PackageLoader
st> NCWindow helloWorld
Object: CFunctionDescriptor new: 1 "<0x7f3fb73c2fe0>" error: Invalid C
call-out initscr
SystemExceptions.CInterfaceError(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.CInterfaceError class(Exception class)>>signal:
(ExcHandling.st:161)
CFunctionDescriptor(CCallable)>>callInto: (CCallable.st:165)
NCWindow class>>primInitScr (NCurses.star#VFS.ZipFile/ncurses.st:1)
NCWindow class>>initscr (NCurses.star#VFS.ZipFile/ncurses.st:1360)
NCWindow class>>helloWorld (NCurses.star#VFS.ZipFile/ncurses.st:2740)
UndefinedObject>>executeStatements (a String:1)
nil

If I load the real library it succeeds:
st> DLD addLibrary: 'libncurses.so.5'
DLD
st> NCWindow helloWorld
NCWindow
st>

Cheers,
Wolfgang



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: DLD and linker scripts

Paolo Bonzini-2
Il 30/05/2012 00:23, Wolfgang Dann ha scritto:
> It would be fine if the DLD could handle linker scripts,
> or at least would generate an appropriate error message.

You're right.  The plan here is to drop <library> and require a small
wrapper module taking care of the linking, similar to what GTK+ already
does.  There will be a program gst-ldflags2c that generates the code
from the linker flags.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk