bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: objdump bug


From: Alan Modra
Subject: Re: objdump bug
Date: Mon, 18 Nov 2002 14:28:25 +1030
User-agent: Mutt/1.4i

On Sat, Nov 16, 2002 at 09:48:47AM +0100, Mauro Meneghin wrote:
> hello, after I had written a very smalll binary file (given in atachment
> for linux intel)
> objdump gives the message :
> 
> Gildo:~$ objdump -d proj/asm/syn/ELFformat1/ELF_minimumsize
> objdump: proj/asm/syn/ELFformat1/ELF_minimumsize: File format not
> recognized
> Gildo:~$
> 
> this error message appears with binaries that have not a section header
> entry for the first opcode found
> this is a bug becouse ELF specification don't require the presence of
> the section header for executable ELF
> 
> my currently version of objdump is:
> GNU objdump 2.11.90.0.19

Current binutils reports:
objdump: /tmp/ELF_minimumsize: File truncated

This is correct as your test binary does not conform to the ELF spec.
e_shoff should be zero when there are no section headers.  If e_shoff
is non-zero and e_shnum is zero, the number of section headers is
found in the sh_size member of section header zero.  See
http://www.caldera.com/developers/gabi/latest/ch4.eheader.html

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]