Re: Symbols in a .so
On Mon, Mar 19, 2007 at 04:48:23AM +0100, Ingo Schwarze wrote: Don't blame the missing man page on the GNU. It is being built, but it is not being installed. Index: gnu/usr.bin/binutils/Makefile.bsd-wrapper === RCS file: /cvs/src/gnu/usr.bin/binutils/Makefile.bsd-wrapper,v retrieving revision 1.67 diff -u -r1.67 Makefile.bsd-wrapper --- gnu/usr.bin/binutils/Makefile.bsd-wrapper 6 Oct 2006 20:58:17 - 1.67 +++ gnu/usr.bin/binutils/Makefile.bsd-wrapper 19 Mar 2007 03:34:43 - @@ -40,8 +40,8 @@ SUBDIRS+=binutils ld gas CONF_SUBDIRS+= binutils ld gas INST_SUBDIRS+= binutils ld gas -MAN+=binutils/ar.1 binutils/ranlib.1 \ - binutils/objcopy.1 \ +MAN+=binutils/addr2line.1 binutils/ar.1 binutils/ranlib.1 \ + binutils/objcopy.1 binutils/readelf.1 \ binutils/strings.1 binutils/strip.1 \ gas/doc/as.1 ld/ld.1 . else it's all fixed now. thanks for the mail. jmc
Re: Symbols in a .so
On 3/18/07, Woodchuck [EMAIL PROTECTED] wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. I think readelf might be what you want.
Re: Symbols in a .so
On Sun, 18 Mar 2007, Woodchuck wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. False alarm! The lib had been stripped during installation. Port maintainer has been notified. nm will give a useful symbol table on an unstripped libxxx.so, as will readelf -s, as Rafael kindly pointed out. Hadn't noticed that readelf thing before. No man page. Hmmm. Smells gnuish... Yeah, there's an info readelf for those curious about it. Thanks to all! Dave -- Resistance is futile. You've already been GPLed.
Re: Symbols in a .so
On Sun, 18 Mar 2007, Rafael Almeida wrote: On 3/18/07, Woodchuck [EMAIL PROTECTED] wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. I think readelf might be what you want. Yeah, that will dump out some useful stuff. Actually the problem is that the .so was from a port, and the library had been installed stripped. On an unstripped .so, nm works fine. Will a stripped .so even work as a library for ld? The one in question seems not to. Dave
Re: Symbols in a .so
On 3/18/07, Woodchuck [EMAIL PROTECTED] wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. If this were an old-style library (i.e. an archive), say libfoo.a, I would use nm. Surely there is a tool for doing this with the .so's. What is it? (it's not strings ;-) The .a library is not available. Uh, you didn't simply try 'nm' and notice that it works on shared objects? If you're looking for something that can see some of the other structure of a shared library, take a look at 'objdump'. Philip Guenther
Re: Symbols in a .so
On Sun, Mar 18, 2007 at 09:30:23PM -0400, Woodchuck wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. If this were an old-style library (i.e. an archive), say libfoo.a, I would use nm. Surely there is a tool for doing this with the .so's. What is it? (it's not strings ;-) The .a library is not available. The tool is still 'nm', of course :-)
Re: Symbols in a .so
On Sun, 18 Mar 2007, Philip Guenther wrote: On 3/18/07, Woodchuck [EMAIL PROTECTED] wrote: I would like to know which symbols are defined in a shareable object library, say libfoo.so.1.0. If this were an old-style library (i.e. an archive), say libfoo.a, I would use nm. Surely there is a tool for doing this with the .so's. What is it? (it's not strings ;-) The .a library is not available. Uh, you didn't simply try 'nm' and notice that it works on shared objects? If you're looking for something that can see some of the other structure of a shared library, take a look at 'objdump'. Nm doesn't work on stripped .so's. It does work on unstripped ones. Thanks for reminding me of objdump; that works, too. (Although it won't show a symbol table (-s) on a stripped .so. -T will show the dynmaic sym.tab. however, stripped or not). I am simply interested in knowing in which library of several possibilities a certain symbol might be defined. Objdump and readelf will do it. thanks to all who responded! Dave
Re: Symbols in a .so
On Sun, Mar 18, 2007 at 10:04:18PM -0400, Woodchuck wrote: Actually the problem is that the .so was from a port, and the library had been installed stripped. On an unstripped .so, nm works fine. It works fine on a stripped .so too. Will a stripped .so even work as a library for ld? Yes. The one in question seems not to. Something's screwed up.
Re: Symbols in a .so
Woodchuck wrote on Sun, Mar 18, 2007 at 10:10:46PM -0400: Hadn't noticed that readelf thing before. No man page. You seem to have a point. Hmmm. Smells gnuish... Don't blame the missing man page on the GNU. It is being built, but it is not being installed. Index: gnu/usr.bin/binutils/Makefile.bsd-wrapper === RCS file: /cvs/src/gnu/usr.bin/binutils/Makefile.bsd-wrapper,v retrieving revision 1.67 diff -u -r1.67 Makefile.bsd-wrapper --- gnu/usr.bin/binutils/Makefile.bsd-wrapper 6 Oct 2006 20:58:17 - 1.67 +++ gnu/usr.bin/binutils/Makefile.bsd-wrapper 19 Mar 2007 03:34:43 - @@ -40,8 +40,8 @@ SUBDIRS+= binutils ld gas CONF_SUBDIRS+= binutils ld gas INST_SUBDIRS+= binutils ld gas -MAN+= binutils/ar.1 binutils/ranlib.1 \ - binutils/objcopy.1 \ +MAN+= binutils/addr2line.1 binutils/ar.1 binutils/ranlib.1 \ + binutils/objcopy.1 binutils/readelf.1 \ binutils/strings.1 binutils/strip.1 \ gas/doc/as.1 ld/ld.1 . else