This is the mail archive of the binutils@sources.redhat.com 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: ELF64 note sections


Daniel Jacobowitz <drow@mvista.com> writes:

> On Thu, Sep 18, 2003 at 05:07:18PM +0930, Alan Modra wrote:
> > However, include/elf/external.h just defines:
> > /* Note segments */
> > 
> > typedef struct {
> >   unsigned char	namesz[4];		/* Size of entry's owner string */
> >   unsigned char	descsz[4];		/* Size of the note descriptor */
> >   unsigned char	type[4];		/* Interpretation of the descriptor */
> >   char		name[1];		/* Start of the name+desc data */
> > } Elf_External_Note;

> That struct is bogus.  BFD code assumes that sizeof (Elf_External_Note)
> is 13, but I've encountered at least one ABI which pads it up to 16
> bytes.

It should be easy enough to add __attribute__((packed)).

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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