Re: ELF expert's help/advice/opinion wanted for two bugs
On Wed, Jun 30, 2004 at 05:35:40PM +0900, GOTO Masanori wrote:
> At Tue, 29 Jun 2004 16:56:14 -0400,
> Daniel Jacobowitz wrote:
> > On Tue, Jun 29, 2004 at 10:42:10PM +0200, Jeroen van Wolffelaar wrote:
> > > http://bugs.debian.org/249435 : lintian
> > >
> > > objdump -T gives "Invalid operation" on some ELF files in
> > > /usr/lib/debug. Is this objdump at fault? On files without a dynamic
> > > section, usually objdump simply doesn't display the dynamic symbols,
> > > so why does it error out here?
> > >
> > > Example:
> > >
> > > $ file /usr/lib/debug/usr/lib/gconv/ISO8859-1.so
> > > ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not
> > > stripped
> > > $ objdump -T /usr/lib/debug/usr/lib/gconv/ISO8859-1.so
> > > (...)
> > > objdump: ISO8859-1.so: Invalid operation
> > > $
> > Because that fail has a dynamic section - but it's empty. This
> > confuses objdump terribly.
> > I don't know if it's an objdump bug or not but my inclination is not.
> > Files in /usr/lib/debug/ are normal libraries, but files in
> > subdirectories of /usr/lib/debug generally won't be now that
> > objcopy --only-keep-debug has been implemented.
> objdump -T is similar to nm -D:
> gotom@moog:~> nm -D /usr/lib/debug/usr/lib/gconv/ISO8859-1.so
> nm: /usr/lib/debug/usr/lib/gconv/ISO8859-1.so: No symbols
> It's better than objdump + bfd error bfd_error_invalid_operation, but
> it's trivial.
The reason this bug got actually reported, is that objdump gives a
non-zero exitstatus. I'd have expected objdump to report the fact there
are no symbols, but still give exitstatus '0'. Something nm doesn't
either by the way.
Jeroen van Wolffelaar
Jeroen@wolffelaar.nl (also for Jabber & MSN; ICQ: 33944357)