how to know which .o file has the definition of a function/subroutine 
Author Message
 how to know which .o file has the definition of a function/subroutine

hi,
I have a bunch of .o file. In case I want to know which file was
compiled from a source code contains the definition of a specific
function/subroutine., how can I do under unix/linux, or any OS.
I do not have the source code yet. After I know which code I need, I
gonna ask for it.
Rgds

Yuan



Tue, 25 Nov 2008 01:05:12 GMT  
 how to know which .o file has the definition of a function/subroutine

Quote:

> I have a bunch of .o file. In case I want to know which file was
> compiled from a source code contains the definition of a specific
> function/subroutine., how can I do under unix/linux, or any OS.

Under any Unix variant, use the nm command; see its man page for
details. Since this is completely OS-specific, there is no way how to
tell you to do it under "any OS".

--
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain



Tue, 25 Nov 2008 01:12:12 GMT  
 how to know which .o file has the definition of a function/subroutine

Quote:
>hi,
>I have a bunch of .o file. In case I want to know which file was
>compiled from a source code contains the definition of a specific
>function/subroutine., how can I do under unix/linux, or any OS.
>I do not have the source code yet. After I know which code I need, I
>gonna ask for it.
>Rgds

>Yuan

 Interesting ! I just dumped some of my .obj files as
 ascii - the full source file name (subroutine or not)
is right near the beginning (WATCOM fortran77) - and
later the actual name of the subroutine  ( or FMAIN was
in a non-subroutine .obj.) about 400 bytes from the beginning.
  ... so it's possible to do it by steam if it's very
important.

Chris



Mon, 24 Nov 2008 19:53:56 GMT  
 how to know which .o file has the definition of a function/subroutine
Thanks.
I used to use nm to search for intrinsic function in dynamic library. I
should have tried that.
Rgds
Yuan
Quote:


> > I have a bunch of .o file. In case I want to know which file was
> > compiled from a source code contains the definition of a specific
> > function/subroutine., how can I do under unix/linux, or any OS.

> Under any Unix variant, use the nm command; see its man page for
> details. Since this is completely OS-specific, there is no way how to
> tell you to do it under "any OS".

> --
> Richard Maine                     | Good judgment comes from experience;
> email: my first.last at org.domain| experience comes from bad judgment.
> org: nasa, domain: gov            |       -- Mark Twain



Tue, 25 Nov 2008 23:20:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using Definition Files w/ Subroutines in a Module

2. passing functions or subroutines in a subroutine

3. integer function with generic include file definition

4. Functions attributes accessed from within the function definition URGENT please

5. Passing functions CONTAINed in a subroutine to other functions

6. How can I know the .EXE file name, file date, file size

7. type known in subroutines

8. Multiple files with the same file definition

9. One file definition - multiple DOS files

10. error by file read in dll subroutine with in main opened File

11. Binding to functions having reference parameter

12. Having problems with NUMVAL function

 

 
Powered by phpBB® Forum Software