Re: Porting binaries from Solaris/SPARC to Linux/Intel

glen herrmannsfeldt <gah@ugcs.caltech.edu>
11 Aug 2004 12:59:04 -0400

          From comp.compilers

Related articles
Porting binaries from Solaris/SPARC to Linux/Intel ganeshnt@s7solutions.com (2004-08-10)
Re: Porting binaries from Solaris/SPARC to Linux/Intel Jeffrey.Kenton@comcast.net (Jeff Kenton) (2004-08-11)
Re: Porting binaries from Solaris/SPARC to Linux/Intel dido@imperium.ph (2004-08-11)
Re: Porting binaries from Solaris/SPARC to Linux/Intel gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-08-11)
Re: Porting binaries from Solaris/SPARC to Linux/Intel kamalp@acm.org (2004-08-11)
Re: Porting binaries from Solaris/SPARC to Linux/Intel tesneddon@bigpond.com (Tim E Sneddon) (2004-08-13)
Re: Porting binaries from Solaris/SPARC to Linux/Intel bmitchel@gmail.com (2004-08-15)
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 11 Aug 2004 12:59:04 -0400
Organization: Comcast Online
References: 04-08-057
Keywords: translator
Posted-Date: 11 Aug 2004 12:59:04 EDT

Ganesh Tiwari wrote:


> i want to write a program, which works much like ldd command, which
> goes throgh c/c++ binary on solaris/SPARC and check whether it is
> possible to port it on to linux/intel. How do i do this? what are
> the parameters to look for in binaries for porting. Any guide lines
> in this direction would be world of good to me. Please reply to this
> fast, i am running out of time.


The usual definition of port is from source, so do you want to be able
to tell if a program source can be ported just by looking at the
object program?


Assuming both are compiled with the same compiler, such as gcc, the
main porting problem is library routines. It should not be hard to
make a list of library routines given the object (.o) files. In some
systems it is possible to do it from the executable, in others it
isn't.


> [Uh, how are you planning to turn the SPARC instructions into x86
> instructions? I'd think that library calls would be the least of
> your problems. -John]


Well, there are systems that do such conversion. I thought that the
early PowerMac's did it to run 680x0 code. Similar to the way
just-in-time compilers work, but do it all before execution starts. I
can't remember what they are usually called, though. On the other
hand, if it is due in a few days, I agree.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.