LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2004, 01:48 AM   #1
jingle_mj
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Rep: Reputation: 0
help shared library


hi all
i have a damn question.

i have a shared linked library(*.so) now.
i want to know the information of interface and interface's paramters in this library.

i use objdump -dx to get the interface information.
but, how can i get the information of interface's paramiters.

thks.
 
Old 08-13-2004, 02:06 AM   #2
max_sipos
Member
 
Registered: Jul 2004
Posts: 96

Rep: Reputation: 15
Hmm, I'm not sure you can do that. Does '.so' keep any information in itself about just what parameters do functions take? I would argue it doesn't, you're just supposed to have a proper header file in order to develop for that shared library. Why do you need to learn the interface without the '.h'?

EDIT: If the debugging symbols are not stripped from the library, this may work: objdump -g

--
Maksim Sipos

Last edited by max_sipos; 08-13-2004 at 02:08 AM.
 
Old 08-13-2004, 02:23 AM   #3
jingle_mj
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
in our project ,every library has implemented a function.
these libraries are developed by third-part-company.
and now ,i must develop a new function,so i have developed a new library.
the question is i have to develop a new library following the rules of exiting library.
unfortunately, we have no any detail and support about the exiting library.

so, the only thing i can do is trying some tools or command to crack the exiting library.

i must get the parameter's information of method in the library.
and know how these method are called.
it's a disaster.
but i have to do.
so......

Last edited by jingle_mj; 08-13-2004 at 02:29 AM.
 
Old 08-13-2004, 02:31 AM   #4
jingle_mj
LQ Newbie
 
Registered: Aug 2004
Posts: 12

Original Poster
Rep: Reputation: 0
when using: "objdump -g"

the result is:

no recognized debugging information
 
Old 08-13-2004, 04:13 AM   #5
max_sipos
Member
 
Registered: Jul 2004
Posts: 96

Rep: Reputation: 15
Well, if there's no way you can get the source or any kind of support from the third-party library manufacturer, I'd try disassembling the library. Do note that that may be illegal depending where you are. This is a really hard thing to do. You have to analyze the entry points of functions and see what kind of machine level instructions are being used for popping the arguments from the stack. You then have to figure out just what the function does with those arguments. I'd really like to hear if there is any other way to do this...

Another possibility, try finding open-source software that uses that library and see how they implemented it.

--
Maksim Sipos
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I get every shared library at? Balkman Linux - General 2 08-28-2004 10:56 PM
help shared library jingle_mj Linux - Newbie 1 08-13-2004 04:36 PM
help shared library jingle_mj Linux - General 1 08-13-2004 03:11 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
gcc 3.3.2, shared library luzi82 Debian 2 12-21-2003 09:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration