extract symbols + object filename + section

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

extract symbols + object filename + section

Josef Angermeier-2

Hello

I need to get out of a library, all its symbols, the corresponding
filename *and* the section.

i tried to use nm but the problem is, using 'nm -A -f posix' it doesn't
display the sections. but using 'nm -f sysv' it does, but i wonder if
this format is supported on all platforms ... is it portable ?

btw using objdump doesn't seem to be the solution... it's output is not
easy to parse...

thanks in advance
josef
Reply | Threaded
Open this post in threaded view
|

Re: extract symbols + object filename + section

Ian Lance Taylor
Josef Angermeier <[hidden email]> writes:

> i tried to use nm but the problem is, using 'nm -A -f posix' it doesn't
> display the sections. but using 'nm -f sysv' it does, but i wonder if
> this format is supported on all platforms ... is it portable ?

nm -f sysv is supported wherever GNU nm is supported.  The 'sysv' just
means the format historically produced by the nm program on System V.

Ian