From: hadi motamedi on
On Feb 10, 9:49 am, Chris Ridd <chrisr...(a)mac.com> wrote:
> On 2010-02-10 08:13:50 +0000, hadi motamedi said:
>
>
>
>
>
> > On Feb 10, 7:04 am, Chris Ridd <chrisr...(a)mac.com> wrote:
> >> On 2010-02-10 06:46:26 +0000, Michael Vilain said:
>
> >>> In article
> >>> <4db6d75a-6a24-43e1-9aec-43a1f6c10...(a)d27g2000yqn.googlegroups.com>,
> >>>  hadi motamedi <motamed...(a)gmail.com> wrote:
>
> >>>> Can you please let me know which other commands (like nm) can be used
> >>>> to bring out useful information from the *.o compiled object file ?
>
> >>> .o files aren't intended for human use.  They're for a link-editor (ld)
> >>> to create a running program.  AFAIK, nm is it.
>
> >> /usr/ccs/bin/elfdump will also extract information from .o files.
> >> --
> >> Chris
>
> > I tried to install the gcc on my Solaris 8 , as the followings :
> > %gunzip gcc-3.2.2-sol8-sparc-local.gz |tar xvf –
> > %pkgadd –d gcc-3.2.2-sol8-sparc-local.pkg
> > But at the end , my Solaris 8 server returned as 'gcc command not
> > found' . Can you please let me know how can I make use of it ?
>
> Set your PATH to include the directory that package put gcc in. If that
> package is from sunfreeware.com, I think it'll need /usr/local/bin.
>
> --
> Chris- Hide quoted text -
>
> - Show quoted text -

Thank you very much . It got through . OR using full path name for the
gcc command.
From: Richard B. Gilbert on
hadi motamedi wrote:
> On Feb 8, 1:38 pm, hume.spamfil...(a)bofh.ca wrote:
>> hadi motamedi <motamed...(a)gmail.com> wrote:
>>> Can you please let me know if the .o file extension comes from Unix/
>>> GCC object files and how to open them ?
>> Yes, .o is a compiled but not linked program. There are a number of
>> compilers for various languages that will spit out a .o file.
>>
>> You can't open them; they're not functional programs, merely the pieces
>> of one. You can find out what functions it contains using 'nm'. ie:
>>
>> nm object.o
>>
>> --
>> Brandon Hume - hume -> BOFH.Ca,http://WWW.BOFH.Ca/
>
> Can you please let me know which other commands (like nm) can be used
> to bring out useful information from the *.o compiled object file ?

What "useful information" are you looking for. A binary object file is
not well stocked with "information". It is usually input to the linker
where it is linked with other modules and library routines to form an
executable binary; e.g. a program that you can execute.

From: hume.spamfilter on
hadi motamedi <motamedi24(a)gmail.com> wrote:
> Thanks for your reply . I found the 'dis' is very helpful . But how
> can I extract the assembly language code by using it ?

What exactly are you trying to accomplish? Is this all just a learning
exercise?

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/
From: Richard B. Gilbert on
hume.spamfilter(a)bofh.ca wrote:
> hadi motamedi <motamedi24(a)gmail.com> wrote:
>> Thanks for your reply . I found the 'dis' is very helpful . But how
>> can I extract the assembly language code by using it ?
>
> What exactly are you trying to accomplish? Is this all just a learning
> exercise?
>

It DOES have a little of the flavor of a student trying to fish someone
into doing his homework for him. . . .
From: Doug McIntyre on
hadi motamedi <motamedi24(a)gmail.com> writes:
>Thanks for your reply . I found the 'dis' is very helpful . But how
>can I extract the assembly language code by using it ?

The output of dis *is* the assembly language code. Thats as human
readable as you are going to get.