Author Topic: opening a shared object (.SO) file  (Read 16524 times)

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
opening a shared object (.SO) file
« on: December 27, 2007, 04:15:32 pm »
Hi,
I am very new here.
I am trying to study the contain of an SO file.
Just wonder if a SO file is able to be opened by Code Block?

Sorry if I have bring in programing discussion...
I am just novice & this should be 1 time deal post, I just to know if Code Block can do this..? 

Offline XayC

  • Multiple posting newcomer
  • *
  • Posts: 94
Re: opening a shared object (.SO) file
« Reply #1 on: December 27, 2007, 04:57:14 pm »
Hi, welcome to the Code::Blocks forums!

I'm sorry but currently CB is not able to open shared libraries, not without a specific plugin at least, but I don't think anyone created it. And actually it makes sense since an IDE is not supposed to open object/binary files.

You can open binary files with an Hex editor. If you look for the .so format specification, I guess (not sure) it uses the ELF format.

Regards, XayC
« Last Edit: December 27, 2007, 05:06:35 pm by XayC »

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: opening a shared object (.SO) file
« Reply #2 on: December 27, 2007, 06:08:37 pm »
Also you need to understand a .so file is a compiled binary, you can't open it and see the code in it or something like that... all you could get is some general information, but you usually can get it from the terminal too, maybe that's what you meant?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: opening a shared object (.SO) file
« Reply #3 on: December 27, 2007, 09:54:25 pm »
Just wonder if a SO file is able to be opened by Code Block?
Yes, you can do that, also DLL's, and (e.g) object files. C::B uses the "nm" tools for that purpose. Hence you need a specific plugin to do so which is part of the contrib plugins. It's name is "SymTab" - symbol table plugin. You will see the contents of a object like file in terms of exported / used functions etc...

With regards, Morten.

XayC & Auria: Never under-estimate the power of C::B. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: opening a shared object (.SO) file
« Reply #4 on: December 28, 2007, 01:07:24 am »
XayC & Auria: Never under-estimate the power of C::B. ;-)

i stand corrected  :lol:

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
Re: opening a shared object (.SO) file
« Reply #5 on: December 28, 2007, 01:31:42 pm »
Thank morten / guys.
I try both search all symbol in given lib and given lib path
But It seems unable to execute NM and asking confirmation if it is on global path?

Do you know what have I missed?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: opening a shared object (.SO) file
« Reply #6 on: December 28, 2007, 03:29:28 pm »
Do you know what have I missed?
Well... did you properly "install" nm.exe at all?! (Or are you at Linux...?!)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
Re: opening a shared object (.SO) file
« Reply #7 on: January 01, 2008, 09:55:25 am »
lol... thanks a lot Morten, I am on dual boot system now

taking few days learning to install on linux based on wiki / forum...lol

seems like the file cannot recognized by NM, just want to know if I am still notdoing correctly.
below is the file


WinXP / Gutsy
SVN 4749 on gutsy


 

[attachment deleted by admin]

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
Re: opening a shared object (.SO) file
« Reply #8 on: January 07, 2008, 12:55:00 pm »
Seems like the file cannot be opened.. Thanks for the advice anyway :wink:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: opening a shared object (.SO) file
« Reply #9 on: January 07, 2008, 02:05:17 pm »
Seems like the file cannot be opened.. Thanks for the advice anyway :wink:
Yes - cause it's a script and not a true shared object library it seems...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
Re: opening a shared object (.SO) file
« Reply #10 on: January 07, 2008, 02:23:33 pm »
Yes - cause it's a script and not a true shared object library it seems...

Thanks Morten.
It just attract my curiosity... if the script can be opened by Code block or other program?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: opening a shared object (.SO) file
« Reply #11 on: January 07, 2008, 02:31:04 pm »
It just attract my curiosity... if the script can be opened by Code block or other program?
You can open it using a hex editor if you like. Other that that the application had to "understand" the binary code. I don't know this scripting environment but I guess support for opening this is very limited, maybe there are tools from the authors... maybe not.

But I guess you don't really want to open the script *binary*... what do you actually have in mind?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Muttala

  • Single posting newcomer
  • *
  • Posts: 8
Re: opening a shared object (.SO) file
« Reply #12 on: January 08, 2008, 12:37:45 pm »
But I guess you don't really want to open the script *binary*... what do you actually have in mind?!

It is actually a file from a windows 2D game.

it attracts me that 5 of the ".so" files (~400 KB) and ~1MB ".ini" setting files are actually controling the core process of whole game of ~900MB (~2% )--- The rest of the file are only graphics and sounds (potraits, maps & mp3 ).

To be honest, I hope to see how the command lines inside those "script" work, just for my personnal study / fun MOD trial on the game
 

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: opening a shared object (.SO) file
« Reply #13 on: January 08, 2008, 02:06:29 pm »
To be honest, I hope to see how the command lines inside those "script" work, just for my personnal study / fun MOD trial on the game
Ok - so you should have stated that in the begining. What you are looking for is not a symbol parser/browser but a decompiler. Well dude... I don't think that's (easily) possible. You first need to figure out what language that script is. Then you need a decompiler for that language. Usually decompilers decompile to assembler only (as the source code can ususally *not* be extratced from compiled binary at all). Exceptions are languages that use an interpreter at runtime like Java. But still: The content is usually scrambled then if it is not an open source project. So chances are minimal that you will ever see the code of this binary. An IDE won't help here at all. Sorry.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ