This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: Segfault when reading a debug-only file.


Ulrich Drepper wrote:
> On 11/16/2009 12:22 AM, Jay Vaughan wrote:
>> It *is* an ELF file.
> 
> Wow, you know so much about this.  It must be that you wrote all that 
> code.  

No, I just ran a standard tool, perhaps you've heard of it, its called 'file', and it
tells you what type of file a file is, based on the files signature.

The tst.debug file is ELF because it has an ELF signature, you see.  It contains ELF
sections.  It has no other purpose than to exist in the ELF ecosystem.  It started out as
a nice pretty ELF, then it got processed by a buggy tool that deals with ELF objects
exclusively, and now .. its become an ELF file that has revealed an un-handled case on the
part of the programmers of those tools.

You might not like to think of a lobotomized person as a person, but I do.  This
lobotomized ELF is still ELF to libelf ..

> Oh wait, no, me thinks this is not the case.  It was all done by 
> my collegues and particularly myself.  

Which is why its so amusing that you run away from problems instead of solve them.  "This
is not an ELF file, thus don't run elflint on it" == "I can't handle the complexity of
this problem, nor do I appreciate the ill light it reflects on me as "The Expert", so go
away or I will insult you a second time".

> So when I say it's not an ELF 
> file then I rather trust that rather than the opinion of some random 
> guy.  

Your authority on this issue doesn't impress me, frankly, especially when you say "This is
not an ELF file, thus don't run elflint on it", even after the file had no other way of
coming into existence other than through libelf itself.  Your authority, actually, doesn't
impress me anyway, but if you say that your ELF expertise results in ELF files that are
not really ELF files, then your buggy software is crap.

It *is* an ELF file, just not a very good or useful one.  But then, the ELF spec does not
state that the contents must be good or useful.

>The file might have an ELF header but the format violates 
> everything about the ELF file format and therefore is no ELF file.

The ELF format is not in any way violated, by the absence of .text or PROGBIT-marked
sections.  Nowhere in the ELF spec does it say that a proper ELF file *has* to have these
sections.  Unless you're reading a magical Ulrich-Drepper version of the spec, in which
case you can happily continue to live in ignorance of the real world while we real people
attempt to deal with your buggy software.

Fix your bugs, Ulrich.  Have a hug too, while you're at it.

Oh, wait:

> I've made eu-readelf handle SHT_NOBITS sections gracefully for -p and -a as
> it already did for -x.

Looks like someone already cleaned up your mess for you, Mr ELF Expert.


-- 
;
--
Jay Vaughan
jay.vaughan@thalesgroup.com


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