Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sun Solaris executable decompiler

436 views
Skip to first unread message

Logan Shaw

unread,
Nov 4, 2000, 3:00:00 AM11/4/00
to
In article <8u2d1a$rh7$1...@mozo.cc.purdue.edu>, <kevink11?@gurumail.com?> wrote:
>I have this executable file under Sun Solaris of program to calculate
>the possible mapping of (x,y) given inputs.
>I want to try to reverse engineering this back to the source code.
>I am not sure in what language it is written, guessing C++.

Type "file executablename". If it says "not stripped", you may be
in luck. It might have debugging info in it or at least symbols
that will help you get some idea of what's going on. I'm not 100%
sure, but I believe that some debugging formats even include the
source code. (It depends on which compiler you used.) You might
try running gdb or another debugger on the executable to see if
you can step through the source. If so, you're in good shape
because all you must do is watch it do what it does.

If that doesn't work, you can always type
"/usr/ccs/bin/dis -L executablename", which will disassemble the
executable into assembly code complete with function labels.
(You can even give the "-C" option to demangle C++ symbols.)

Actually, the disassembled code may still be a big pain to deal
with, especially if it was built by an optimizing compiler or
assembler that likes to reorder instructions to gain
performance, as is common on pipelined machines like the SPARC.
Branch delay slots are good for performance, but they can make
the disassembled code confusing if you don't know about them.

You should also be able to use a debugger to step through the
execution of the program itself, even if not at the source level.

None of these methods will just automatically spit out a file that
contains the source of the program, but they all might get you a little
closer to where you want to be, depending on the circumstances.

Hope that helps.

- Logan

Gergo Barany

unread,
Nov 4, 2000, 9:01:12 PM11/4/00
to
[I would set the followups, but I don't think this belongs into
either of the groups.]

kevink11?@gurumail.com? <kevink11?@gurumail.com?> wrote:
> Hi all programmers out there,


>
> I have this executable file under Sun Solaris of program to calculate
> the possible mapping of (x,y) given inputs.
> I want to try to reverse engineering this back to the source code.
> I am not sure in what language it is written, guessing C++.

In the past there have been numerous threads on decompilation in
comp.lang.c. The general concensus was always that it's impossible
("like turning a hamburger back into a cow").
Try a web search, though; maybe that will help.

> Anybody have a suggestion on how to do this?

Find whoever wrote the program and ask if they would give you the
source. Or write a specification and reimplement it.

Gergo

--
Whenever you find that you are on the side of the majority, it is
time to reform.
-- Mark Twain

Mark McIntyre

unread,
Nov 5, 2000, 3:00:00 AM11/5/00
to
On 5 Nov 2000 02:01:12 GMT, gergo....@gmx.net (Gergo Barany) wrote:

>[I would set the followups, but I don't think this belongs into
>either of the groups.]
>
>kevink11?@gurumail.com? <kevink11?@gurumail.com?> wrote:
>> I want to try to reverse engineering this back to the source code.
>> I am not sure in what language it is written, guessing C++.
>
>In the past there have been numerous threads on decompilation in
>comp.lang.c. The general concensus was always that it's impossible
>("like turning a hamburger back into a cow").

Actually most of them concluded you _can_ do it but its likely to be
as similar to C code as cow is to reconstituted cow.

It may exhibit characteristics of cow eg smelly, contains small
amounts of meat, contains lots of gristle, intestine etc, it may even
be cow-shaped, but most onlookers would disagree that it -was- cow,
except in the most general terms....

--
Mark McIntyre
C- FAQ: http://www.eskimo.com/~scs/C-faq/top.html

Johan De Wit

unread,
Nov 6, 2000, 3:00:00 AM11/6/00
to
Hi,

You can also use REC. Don't know the URL, but doe a search on it. Try
also 'reverse engeneering'

Good luck

Johan

0 new messages