Ask a Question related to UNIX Programming, Design and Development.
-
Barry Margolin #1
Re: Disassemby of Code
In article <79645363.0307250800.17ab1c99@posting.google.com >,
vrk1981 <vrk1981@yahoo.com> wrote:What does "man -k disassembler" show? It should list "dis" on Solaris.>Is there a tool (Linux or Solaris) that can be used to get the disassembled code
>corresponding to the C executable code (a.out) that GNU compiler (gcc)
>produces.
--
Barry Margolin, [email]barry.margolin@level3.com[/email]
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Barry Margolin Guest
-
Why doesn't the Code Completion occur in FlexBuilder IDEwhen source code is in an external file?
I am seperating my .as from the MXML by using the following in my file.mxml: <mx:Script source="file.as"> When I edit file.as, the code... -
How would I include the Open Browser code into this lineof code?
Hello and thankyou in advance: I have an ASP page linked to my database and I want to apply the Open Browser behaviour to the code. I have tried... -
Custom control fires event but ignores some code in the code behind file
I do not quite understand the question. I will merely point out that most programming problems happen for a reason. Code works the way it is... -
Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated.
I created a brand new WebService (HelloWorld) and when I attempt to add this WebService to a WindowsForm project I get the following error message in... -
Security problem with Managed Code calling Unmanaged Code in a Web Page
Hello, I have a web page which contains an ActiveX control (unmanaged) and a Windows Forms User Control (managed). Both reside on a web page and... -
David Medeiros #2
Re: Disassemby of Code
objdump will show you the disassembled code.
objdump --source --disassemble <executable file name>
you can also do a
man objdump
"vrk1981" <vrk1981@yahoo.com> wrote in message
news:79645363.0307250800.17ab1c99@posting.google.c om...disassembled code> Dear Sir/Madam,
>
> Is there a tool (Linux or Solaris) that can be used to get the> corresponding to the C executable code (a.out) that GNU compiler (gcc)
> produces.
>
> Thank you for your time.
>
> Regards,
> Ramakrishnan.V
David Medeiros Guest
-
vrk1981 #3
Re: Disassemby of Code
Dear Sir,
I tried it in both linux and solaris and got the following
======
$ man odjdump
No manual entry for odjdump
=========
Thanks,
Ramakrishnan.V
"David Medeiros" <dmedeiros@broadbus.com> wrote in message news:<cc539f7ed1c305f6bc4c5923096b445b@free.terane ws.com>...> objdump will show you the disassembled code.
>
> objdump --source --disassemble <executable file name>
>
> you can also do a
> man objdump
>
>
>
> "vrk1981" <vrk1981@yahoo.com> wrote in message
> news:79645363.0307250800.17ab1c99@posting.google.c om...> disassembled code> > Dear Sir/Madam,
> >
> > Is there a tool (Linux or Solaris) that can be used to get the> > corresponding to the C executable code (a.out) that GNU compiler (gcc)
> > produces.
> >
> > Thank you for your time.
> >
> > Regards,
> > Ramakrishnan.Vvrk1981 Guest
-
Binary #4
Re: Disassemby of Code
To begin with, I answered your original post on comp.lang.c, don't crosspost
if you get an answer.
You will need your development packages then, if you cannot find objdump. I
told you (in comp.lang.c) to use objdump with the -D switch. What is your
Linux distribution? On Redhat you will have to install the binutils rpm I
believe, on Slackware, go into the D packages section, and find the
development binaries.
"vrk1981" <vrk1981@yahoo.com> wrote in message
news:79645363.0307251641.7b28f2e6@posting.google.c om...news:<cc539f7ed1c305f6bc4c5923096b445b@free.terane ws.com>...> Dear Sir,
>
> I tried it in both linux and solaris and got the following
> ======
> $ man odjdump
> No manual entry for odjdump
> =========
>
> Thanks,
> Ramakrishnan.V
>
> "David Medeiros" <dmedeiros@broadbus.com> wrote in message> > objdump will show you the disassembled code.
> >
> > objdump --source --disassemble <executable file name>
> >
> > you can also do a
> > man objdump
> >
> >
> >
> > "vrk1981" <vrk1981@yahoo.com> wrote in message
> > news:79645363.0307250800.17ab1c99@posting.google.c om...> > disassembled code> > > Dear Sir/Madam,
> > >
> > > Is there a tool (Linux or Solaris) that can be used to get the> > > corresponding to the C executable code (a.out) that GNU compiler (gcc)
> > > produces.
> > >
> > > Thank you for your time.
> > >
> > > Regards,
> > > Ramakrishnan.V
Binary Guest
-
vrk1981 #5
Re: Disassemby of Code
Dear Sir,
Yes it lists "dis".
i tried "dis a.out" and got a huge Assembly kanguage cide for a simlple C code!
Just curious to know if we can get the source ( .c ) fine too!
Thanks
Ramakrishnan.V
Barry Margolin <barry.margolin@level3.com> wrote in message news:<R7dUa.397$0z4.371@news.level3.com>...> In article <79645363.0307250800.17ab1c99@posting.google.com >,
> vrk1981 <vrk1981@yahoo.com> wrote:>> >Is there a tool (Linux or Solaris) that can be used to get the disassembled code
> >corresponding to the C executable code (a.out) that GNU compiler (gcc)
> >produces.
> What does "man -k disassembler" show? It should list "dis" on Solaris.vrk1981 Guest
-
Artie Gold #6
Re: Disassemby of Code
vrk1981 wrote:
That's objdump, not odjdump.> Dear Sir,
>
> I tried it in both linux and solaris and got the following
> ======
> $ man odjdump
> No manual entry for odjdump
--ag
If you're looking for the original source code, forget it; do a google> =========
>
> Thanks,
> Ramakrishnan.V
>
> "David Medeiros" <dmedeiros@broadbus.com> wrote in message news:<cc539f7ed1c305f6bc4c5923096b445b@free.terane ws.com>...
>>>objdump will show you the disassembled code.
>>
>> objdump --source --disassemble <executable file name>
>>
>>you can also do a
>> man objdump
>>
>>
>>
>>"vrk1981" <vrk1981@yahoo.com> wrote in message
>>news:79645363.0307250800.17ab1c99@posting.google .com...
>>>>>>>Dear Sir/Madam,
>>>
>>>Is there a tool (Linux or Solaris) that can be used to get the
>> disassembled code
>>>>>corresponding to the C executable code (a.out) that GNU compiler (gcc)
>>>produces.
>>>
serach on `decompilation C' to see why.
HTH,
--ag
--
Artie Gold -- Austin, Texas
Artie Gold Guest
-
Kurtis D. Rader #7
Re: Disassemby of Code
On Fri, 25 Jul 2003 17:46:30 +0000, vrk1981 wrote:
Of course not. The CPU executes "opcodes". Those opcodes, in> i tried "dis a.out" and got a huge Assembly kanguage cide for a simlple C
> code!
>
> Just curious to know if we can get the source ( .c ) fine too!
general, correspond to very simple operations; for example, adding two
numbers. There is no way to convert from a stream of machine opcodes
to statements in the C language (or any "high level" language for that
matter). What the dis(1) and objdump(1) commands do is convert the
numeric opcodes to assembly language statements. Those statements are
a close approximation of the assembly language code emitted by the C
compiler. A given statement in C can result zero, one, or many assembly
statements (i.e., machine opcodes).
If none of the above makes any sense you need to learn how to program
in assembly language (as opposed to C) for your system. Then it will
make sense :-)
Kurtis D. Rader Guest
-
David Schwartz #8
Re: Disassemby of Code
"vrk1981" <vrk1981@yahoo.com> wrote in message
news:79645363.0307251646.7c691968@posting.google.c om...
code!> i tried "dis a.out" and got a huge Assembly kanguage cide for a simlple C
You asked for the disassembled code corresponding to that source code.
For "simple C code" that's going to be a huge assembly language program.
Then you're not talking about disassembling, you're talking about> Just curious to know if we can get the source ( .c ) fine too!
decompiling!
DS
David Schwartz Guest
-
Greg P. #9
Re: Disassemby of Code
"David Schwartz" <davids@webmaster.com> wrote in message
news:bfv1c8$6if$1@nntp.webmaster.com...Something that (when I was naive), I tried many, many times to create...all> You asked for the disassembled code corresponding to that source code.
> For "simple C code" that's going to be a huge assembly language program.
ending up as unfinished projects. I don't think any program (that's free or
relatively small) can parse the mangled-assembly code from objdump (and the
like) and form a proper C source file. I know that one exists for Java (as I
have it), but Java compiles into a different format (bytecode). If you want
to learn ASM and create C from it, good luck and let me know =)
Greg P. Guest
-
Kenny McCormack #10
Re: Disassemby of Code
In article <6n1Va.1492$Bg.209@newsread4.news.pas.earthlink.ne t>,
Greg P. <no@spam.sam> wrote:This is interesting. I think I've had much the same experience as you;>"David Schwartz" <davids@webmaster.com> wrote in message
>news:bfv1c8$6if$1@nntp.webmaster.com...>>> You asked for the disassembled code corresponding to that source
>> code. For "simple C code" that's going to be a huge assembly
>> language program.
>Something that (when I was naive), I tried many, many times to
>create...all ending up as unfinished projects. I don't think
>any program (that's free or relatively small) can parse the
>mangled-assembly code from objdump (and the like) and form a proper C
>source file. I know that one exists for Java (as I have it), but Java
>compiles into a different format (bytecode). If you want to learn ASM
>and create C from it, good luck and let me know =)
that is, I think it ought to be possible to convert the output of
a disassembler into compilable C code (not, of course, into the original
C code, complete with comments, or even into anything remotely
human-readable, but merely to something that can be compiled and run).
However, I've never been able to do it.
At a minimum, it ought to be possible to convert it into a compilable .S
file, but even that is apparently easier said than done.
Kenny McCormack Guest
-
David Schwartz #11
Re: Disassemby of Code
"Kenny McCormack" <gazelle@yin.interaccess.com> wrote in message
news:bg440u$1ni$1@yin.interaccess.com...
> >Something that (when I was naive), I tried many, many times to
> >create...all ending up as unfinished projects. I don't think
> >any program (that's free or relatively small) can parse the
> >mangled-assembly code from objdump (and the like) and form a proper C
> >source file. I know that one exists for Java (as I have it), but Java
> >compiles into a different format (bytecode). If you want to learn ASM
> >and create C from it, good luck and let me know =)> This is interesting. I think I've had much the same experience as you;
> that is, I think it ought to be possible to convert the output of
> a disassembler into compilable C code (not, of course, into the original
> C code, complete with comments, or even into anything remotely
> human-readable, but merely to something that can be compiled and run).> However, I've never been able to do it.There are programs that do this. It's not particularly difficult. If I> At a minimum, it ought to be possible to convert it into a compilable .S
> file, but even that is apparently easier said than done.
had more time right now, I'd dig up a reference for you.
DS
David Schwartz Guest
-
Greg P. #12
Re: Disassemby of Code
"David Schwartz" <davids@webmaster.com> wrote in message
news:bg47sd$9j7$1@nntp.webmaster.com...I know that this newsgroup is pretty much a GPL-mindset (in terms of> There are programs that do this. It's not particularly difficult. If I
> had more time right now, I'd dig up a reference for you.
licenses), but imagine what would happen if such decompilation programs
(from exe to asm to c) became widespread. I don't care much for
closed-source, proprietary coders or programs, but I'm sure that some
companies would get a bit unnerved! Hehe! =)
Greg P. Guest
-
Barry Margolin #13
Re: Disassemby of Code
In article <ZXhVa.1444$mr1.938@newsread3.news.pas.earthlink.n et>,
Greg P. <no@spam.sam> wrote:Why? The resulting C code won't look anything like what they originally>"David Schwartz" <davids@webmaster.com> wrote in message
>news:bg47sd$9j7$1@nntp.webmaster.com...>>> There are programs that do this. It's not particularly difficult. If I
>> had more time right now, I'd dig up a reference for you.
>I know that this newsgroup is pretty much a GPL-mindset (in terms of
>licenses), but imagine what would happen if such decompilation programs
>(from exe to asm to c) became widespread. I don't care much for
>closed-source, proprietary coders or programs, but I'm sure that some
>companies would get a bit unnerved! Hehe! =)
wrote. It doesn't have any more information than the binary code that was
used to generate it, it's just a little "prettier".
--
Barry Margolin, [email]barry.margolin@level3.com[/email]
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Barry Margolin Guest
-
Rich Teer #14
Re: Disassemby of Code
On Mon, 28 Jul 2003, Greg P. wrote:
YOu must be confusing us with comp.linux.programmer. :-)> I know that this newsgroup is pretty much a GPL-mindset (in terms of
> licenses), but imagine what would happen if such decompilation programs
So why are you using M$ Outhouse to post?> (from exe to asm to c) became widespread. I don't care much for
> closed-source, proprietary coders or programs, but I'm sure that some
> companies would get a bit unnerved! Hehe! =)
--
Rich Teer, SCNA, SCSA
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: [url]http://www.rite-online.net[/url]
Rich Teer Guest
-
Greg P. #15
Re: Disassemby of Code
"Rich Teer" <rich.teer@rite-group.com> wrote in message
news:Pine.GSO.4.44.0307281640500.11592-100000@zaphod.rite-group.com...Your statement is sorta true. I do believe that most peeps here are happy> On Mon, 28 Jul 2003, Greg P. wrote:
> YOu must be confusing us with comp.linux.programmer. :-)
with GNU-based licenses though...opposed to strict UNIX ones =)
If I could pick my choice of ng readers I would, but the office does not> So why are you using M$ Outhouse to post?
allow =(
Greg P. Guest
-
David Schwartz #16
Re: Disassemby of Code
"Greg P." <no@spam.sam> wrote in message
news:ZXhVa.1444$mr1.938@newsread3.news.pas.earthli nk.net...
> "David Schwartz" <davids@webmaster.com> wrote in message
> news:bg47sd$9j7$1@nntp.webmaster.com...I> > There are programs that do this. It's not particularly difficult. If> > had more time right now, I'd dig up a reference for you.The decompiled program conveys little more useful information than the> I know that this newsgroup is pretty much a GPL-mindset (in terms of
> licenses), but imagine what would happen if such decompilation programs
> (from exe to asm to c) became widespread. I don't care much for
> closed-source, proprietary coders or programs, but I'm sure that some
> companies would get a bit unnerved! Hehe! =)
disassembled one.
DS
David Schwartz Guest
-
dmills@spamblock.demon.co.uk #17
Re: Disassemby of Code
Greg P. <no@spam.sam> wrote:
I seem to recall an incident involving some form of 'compiled' basic a few> I know that this newsgroup is pretty much a GPL-mindset (in terms of
> licenses), but imagine what would happen if such decompilation programs
> (from exe to asm to c) became widespread. I don't care much for
> closed-source, proprietary coders or programs, but I'm sure that some
> companies would get a bit unnerved! Hehe! =)
years back (possibly an early version of visual basic) where it was
discovered that the the 'compiled executable' was really just the interpreter
with the source code concatinated onto the end of the executable.
IIRC red faces were the result, but I just remember noticing this in
story in passing so some of the details may be wrong.
Regards, Dan.
--
** The email address *IS* valid, do NOT remove the spamblock
And on the evening of the first day the lord said...........
..... LX 1, GO!; and there was light.
dmills@spamblock.demon.co.uk Guest



Reply With Quote

