This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: ELF phdrs in .debug files


On Tue, May 22, 2007 at 01:33:33PM +0930, Alan Modra wrote:
> On Mon, May 21, 2007 at 06:56:19PM -0700, Roland McGrath wrote:
> > > gdb doesn't, apparently.  What other consumers?
> > 
> > elfutils libdwfl.  There may be others we aren't aware of.  To begin with,
> > it's an incompatible, information-losing ABI change, and I think that alone
> > ought to be enough not to do it lightly.
> 
> You're going overboard with the rhetoric.  The fact is that libdwfl is
> making use of information that no one has promised would be available,
> that originally was not available with --only-keep-debug, and is only
> in debug info files by accident.

The debug info files were added in elfutils first (November 2002 AFAIK)
and only after a while in binutils (June 2003).  As there is no formal
specification of the file format, I'd say that what eu-strip produces should
be taken as informal specification, and that certainly always intentionally
emitted the program headers.
It certainly could have p_filesz 0 and only have non-zero p_memsz matching
the original size (as all allocated sections are SHT_NOBITS in the debuginfo
file anyway), but completely removing the program headers means losing
important information.

	Jakub


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