ELF64 note sections

Alan Modra amodra@bigpond.net.au
Thu Sep 18 07:39:00 GMT 2003


http://www.caldera.com/developers/gabi/latest/ch5.pheader.html#note_section
says of note sections:

  "In 64-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS64),
each entry is an array of 8-byte words in the format of the target
processor. In 32-bit objects (files with e_ident[EI_CLASS] equal to
ELFCLASS32), each entry is an array of 4-byte words in the format of the
target processor."

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;

ie. there aren't Elf64_External_Note and Elf32_External_Note variants.

It appears that core dumps generated by 64-bit Linux kernels just follow
the 32-bit layout too.  What's more, I can't see any need whatsoever for
> 4G notes, so perhaps the gabi needs altering here.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list