FreeBSD/contrib/binutils/binutils/readelf.c
/* Note that by the ELF standard, the name field is already null byte
   terminated, and namesz includes the terminating null byte.
   I.E. the value of namesz for the name "FSF" is 4.

   If the value of namesz is zero, there is no name present.  */
Note that by the ELF standard, the name field is already null byte
terminated, and namesz includes the terminating null byte.

If the value of namesz is zero, there is no name present.
Note that by the ELF standard the name field is already null byte terminated and namesz includes the terminating null byte . If the value of namesz is zero there is no name present .
static int
process_note (Elf_Internal_Note *pnote)
{
  const char *nt;
  if (pnote->namesz == 0)
    nt = get_note_type (pnote->type);
  else if (const_strneq (pnote->namedata, "FreeBSD"))
    nt = get_freebsd_note_type (pnote->type);
  else if (const_strneq (pnote->namedata, "GNU"))
    nt = get_gnu_note_type (pnote->type);
  else if (const_strneq (pnote->namedata, "NetBSD-CORE"))
    nt = get_netbsd_elfcore_note_type (pnote->type);
  else
      nt = get_note_type (pnote->type);
  printf ("  %-13s 0x%08lx\t%s\n",
	  pnote->namesz ? pnote->namedata : "(NONE)",
	  pnote->descsz, nt);
  return 1;
}
static int process_note ( Elf_Internal_Note * pnote ) { const char * nt ; if ( pnote -> namesz == 0 ) nt = get_note_type ( pnote -> type ) ; else if ( const_strneq ( pnote -> namedata , " " ) ) nt = get_freebsd_note_type ( pnote -> type ) ; else if ( const_strneq ( pnote -> namedata , " " ) ) nt = get_gnu_note_type ( pnote -> type ) ; else if ( const_strneq ( pnote -> namedata , " " ) ) nt = get_netbsd_elfcore_note_type ( pnote -> type ) ; else nt = get_note_type ( pnote -> type ) ; printf ( " \t \n " , pnote -> namesz ? pnote -> namedata : " " , pnote -> descsz , nt ) ; return 1 ; }
Note that by the ELF standard, the name field is already null byte
terminated, and namesz includes the terminating null byte.
Note that by the ELF standard the name field is already null byte terminated and namesz includes the terminating null byte .
/* If there is no note name, then use the default set of
       note type strings.  */ /* FreeBSD-specific core file notes.  */ /* GNU-specific notes */ /* NetBSD-specific core file notes.  */ /* Don't recognize this note name; just use the default set of
       note type strings.  */