[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wrapping code



A Divendres 25 Novembre 2005 15:25, vàreu escriure:
> > It is possible. Nothing is impossible. But it is also quite stupid.
> >
> > You would need a very god reason, like you get paid for it, to do this.
>
> You'd also need a good reason why you couldn't just buy the original
> source. It's almost certainly cheaper than trying to wedge the existing
> library into a 64-bit executable.

Look the code is the driver for a device (A Sensable Haptic). It's not really 
a driver in the manner that need some kernel hack, it uses the parallel port 
to communicate with the device. The company only provides the driver for Red 
Hat 7.2 and Red Hat 9.0. We bought the RH7.2 drivers and if we want the RH9 
version, although it's the same version, they ask us to pay again, as a new 
driver or equivalent sum of money as upgrade and it's a lot of money. Of 
course that we cannot but the original source code.

The device really would work better in a 64bits platform because use a lot of 
intensive mathematical calculus

> > > If it's possible, how I can do that? rewriting the headers and a cpp
> > > code calling the library functions? and the compiler, have I to make
> > > some special flag? can I reuse a .so as a .a?
> > >
> > > This idea could help to the people that have devices that have
> > > libraries to develop with them but not the source code and for example
> > > want to change of distro or upgrade an a amd64. Of course that if the
> > > library is compiled in a 32 bits it will be 32 bit, but it's possible
> > > to mix 64bit and 32bits code?
> >
> > You need a library that mmaps the old library into a 32bit address
>
> You also need to manually perform dynamic linking after loading the
> library, and provide thinks for all the C library functions used by the
> library. Potentially also intercept syscalls and translate those.

Ok,

thank's a lot Paul for the answer.
-- 
Linux User 152692 
Catalonia

Attachment: pgpxBr9MeLpN8.pgp
Description: PGP signature


Reply to: