This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How I know which modules from a givem library one program has?


>   Dear all
> 
>       I am using Linux as plataform of work and the compiller "gcc".
> My programs call mathematical routines that are in Mathematical Library. I
> have the sources of that library. That library is organized in layers. I
> want a way (with gnu tools) of knowing the routines or modules  that are
> inserted at compilation time from that library.

The GNU linker has an option --print-map, which might help you.
To get GCC to tell the linker to print the map, you would say

gcc -Xlinker --print-map [files,options,etc]

>From the GNU linker manual:

--print-map 
 Print a link map to the standard output. A link map provides
 information about the link, including the following:

 * Where object files and symbols are mapped into memory.
 * How common symbols are allocated.
 * All archive members included in the link, with a mention of the symbol
   which caused the archive member to be brought in.

This only works on GNU/Linux or if the compiler has been configured to
use the GNU linker.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]