From: Chris Ridd on 9 Feb 2010 06:14 On 2010-02-09 10:57:44 +0000, hadi motamedi said: > So it seems that I have SUN compilers installed . Can you please let > me know how can I make use of them to compile my C++ code into *.o > file ? Try reading the C++ compiler manual. Search docs.sun.com for "sun studio". -- Chris
From: Casper H.S. Dik on 9 Feb 2010 06:49 hadi motamedi <motamedi24(a)gmail.com> writes: >Thank you for your reply . I checked on my Solaris 8 server for the >compiler packages : >bash-2.03# pkginfo |grep Compiler >system SUNWlibC Sun Workshop Compilers Bundled libC >system SUNWmfdev Motif UIL Compiler >system SUNWscbcp SPARCompilers Binary Compatibility Libraries >So it seems that I have SUN compilers installed . Can you please let >me know how can I make use of them to compile my C++ code into *.o >file ? No, you're not; the three packages listed are the runtime packages (plus the *motif* compiler). Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.
From: Richard B. Gilbert on 9 Feb 2010 10:44 hadi motamedi wrote: > On Feb 9, 8:07 am, Ian Collins <ian-n...(a)hotmail.com> wrote: >> hadi motamedi wrote: >>> On Feb 9, 7:28 am, Ian Collins <ian-n...(a)hotmail.com> wrote: >>>> hadi motamedi wrote: >>>>> Thanks for your reply . I want to try for my own . My server is >>>>> Solaris 8 and the target is running VxWorks 5.4.2 . Can you please let >>>>> me know what application packages do I need to install on my Solaris 8 >>>>> to do the job ? I want to write my own function and put it inside >>>>> the .o compiled file and upload to the target to run. >>>> You can't do that unless you have the original source file. >>> Thank you for your help. I do not want to replace one of the functions >>> inside the original *.o file but rather want to try to write my own >>> sample code with a few functions inside. Actually , I want to replace >>> the original *.o file with my own compiled code . I need to know which >>> application packages I need to have on my Solaris 8 server to produce >>> the same *.o file format ,since my VxWorks target just reads *.o >>> executable files in his /compile/ppc folder . Please give me a hint on >>> this . >> If you are cross-compiling for a VxWorks target, you need the >> appropriate vendor tools. You should check with them. >> >> -- >> Ian Collins- Hide quoted text - >> >> - Show quoted text - > > Thank you for your comment . But generally speaking , can you please > let me know which Solaris 8 compilers do produce *.o compiled file > output ? > All of them! That's what compilers do! A C compiler is readily available. I've never tried to find Fortran for Solaris but it's possible, even probable, that a Fortran compiler exists. A BASIC interpreter may be available somewhere but I couldn't say where.
From: hadi motamedi on 10 Feb 2010 01:20 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 ?
From: Doug McIntyre on 10 Feb 2010 01:49
hadi motamedi <motamedi24(a)gmail.com> writes: >On Feb 8, 1:38=A0pm, 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. =A0There 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. =A0You can find out what functions it contains using 'nm'. =A0ie: >> >> =A0 =A0 =A0 =A0 nm object.o >> >> -- >> Brandon Hume =A0 =A0- 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 ? nm will give you the best info you are going to get out of it. dis may be helpful if you understand assembly language that the source is actually assembled into before the assembler takes over and creates the .o file, but then you'll have to reverse engineer what the code is doing. Unless you have alot of time to reverse engineer, its usually quicker and easier to rewrite everything from scratch. It takes quite a special person to be able to do reverse engineering and get something usable. The .o file has the minimal information left needed to get everything into a program, this is not a file format that is close to the original source, this is a file that is bare-bones machine level in order to get a program to run on the machine. |