LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   help shared library (https://www.linuxquestions.org/questions/programming-9/help-shared-library-217009/)

jingle_mj 08-13-2004 01:48 AM

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.

max_sipos 08-13-2004 02:06 AM

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

jingle_mj 08-13-2004 02:23 AM

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......

jingle_mj 08-13-2004 02:31 AM

when using: "objdump -g"

the result is:

no recognized debugging information

max_sipos 08-13-2004 04:13 AM

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


All times are GMT -5. The time now is 07:20 AM.