Index: elfdump/elfdump.c
===================================================================
--- elfdump/elfdump.c	(revision 3987)
+++ elfdump/elfdump.c	(working copy)
@@ -617,7 +617,8 @@
 static void	elf_print_reloc(struct elfdump *ed);
 static void	elf_print_got(struct elfdump *ed);
 static void	elf_print_got_section(struct elfdump *ed, struct section *s);
-static void	elf_print_note(struct elfdump *ed);
+static void	elf_print_notes(struct elfdump *ed);
+static void	elf_print_note(struct elfdump *ed, struct section *s);
 static void	elf_print_svr4_hash(struct elfdump *ed, struct section *s);
 static void	elf_print_svr4_hash64(struct elfdump *ed, struct section *s);
 static void	elf_print_gnu_hash(struct elfdump *ed, struct section *s);
@@ -1098,7 +1099,7 @@
 	if (ed->options & ED_SYMVER)
 		elf_print_symver(ed);
 	if (ed->options & ED_NOTE)
-		elf_print_note(ed);
+		elf_print_notes(ed);
 	if (ed->options & ED_HASH)
 		elf_print_hash(ed);
 	if (ed->options & ED_CHECKSUM)
@@ -2050,32 +2051,22 @@
 }
 
 /*
- * Dump the content of .note.ABI-tag section.
+ * Dump the content of note section.
  */
 static void
-elf_print_note(struct elfdump *ed)
+elf_print_note(struct elfdump *ed, struct section *s)
 {
-	struct section	*s;
 	Elf_Data        *data;
 	Elf_Note	*en;
 	uint32_t	 namesz;
 	uint32_t	 descsz;
 	uint32_t	 desc;
+	uint32_t	 type;
 	size_t		 count;
 	int		 elferr, i;
 	uint8_t		*src;
 	char		 idx[17];
 
-	s = NULL;
-	for (i = 0; (size_t)i < ed->shnum; i++) {
-		s = &ed->sl[i];
-		if (s->type == SHT_NOTE && s->name &&
-		    !strcmp(s->name, ".note.ABI-tag") &&
-		    (STAILQ_EMPTY(&ed->snl) || find_name(ed, s->name)))
-			break;
-	}
-	if ((size_t)i >= ed->shnum)
-		return;
 	if (ed->flags & SOLARIS_FMT)
 		PRT("\nNote Section:  %s\n", s->name);
 	else
@@ -2093,6 +2084,7 @@
 		en = (Elf_Note *) (uintptr_t) src;
 		namesz = en->n_namesz;
 		descsz = en->n_descsz;
+		type = en->n_type;
 		src += sizeof(Elf_Note);
 		count -= sizeof(Elf_Note);
 		if (roundup2(namesz, 4) + roundup2(descsz, 4) > count) {
@@ -2099,12 +2091,19 @@
 			warnx("truncated note section");
 			return;
 		}
+
 		if (ed->flags & SOLARIS_FMT) {
 			PRT("\n    type   %#x\n", en->n_type);
-			PRT("    namesz %#x:\n", en->n_namesz);
-			PRT("%s\n", src);
-		} else
-			PRT("\t%s ", src);
+			PRT("    namesz %#x:", en->n_namesz);
+			if (namesz != 0)
+				PRT("\n%s", src);
+			PRT("\n");
+		} else {
+			if (namesz != 0)
+				PRT("\t%s ", src);
+			else
+				PRT("\t0 ");
+		}
 		src += roundup2(namesz, 4);
 		count -= roundup2(namesz, 4);
 
@@ -2127,11 +2126,13 @@
 			}
 			PRT("\n");
 		} else {
-			if (ed->ehdr.e_ident[EI_DATA] == ELFDATA2MSB)
+			if (en->n_descsz == 0)
+				desc = 0;
+			else if (ed->ehdr.e_ident[EI_DATA] == ELFDATA2MSB)
 				desc = be32dec(src);
 			else
 				desc = le32dec(src);
-			PRT("%d\n", desc);
+			PRT("%d (%d)\n", desc, type);
 		}
 		src += roundup2(descsz, 4);
 		count -= roundup2(descsz, 4);
@@ -2139,6 +2140,27 @@
 }
 
 /*
+ * Dump the content of note sections.
+ */
+static void
+elf_print_notes(struct elfdump *ed)
+{
+	struct section	*s;
+	int		 i;
+	
+	if (!STAILQ_EMPTY(&ed->snl))
+		return;
+
+	s = NULL;
+	for (i = 0; (size_t)i < ed->shnum; i++) {
+		s = &ed->sl[i];
+		if (s->type != SHT_NOTE)
+			continue;
+		elf_print_note(ed, s);
+	}
+}
+
+/*
  * Dump a hash table.
  */
 static void
Index: test/elfdump/ts/exec3/@G%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@G%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@G@e%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@G@e%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@G@e%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@G@e%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@S@G%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@G%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@S@c@s%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@c@s%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@c@s%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@c@s%note_sections.out	(working copy)
@@ -0,0 +1,53 @@
+
+Section Header[1]:  sh_name: .strtab
+    sh_addr:      0               sh_flags:   0
+    sh_size:      0x77            sh_type:    [ SHT_STRTAB ]
+    sh_offset:    0x170           sh_entsize: 0
+    sh_link:      0               sh_info:    0
+    sh_addralign: 0x1
+
+Section Header[2]:  sh_name: .text
+    sh_addr:      0               sh_flags:   [ SHF_ALLOC|SHF_EXECINSTR ]
+    sh_size:      0x8             sh_type:    [ SHT_PROGBITS ]
+    sh_offset:    0x40            sh_entsize: 0
+    sh_link:      0               sh_info:    0
+    sh_addralign: 0x4
+
+Section Header[3]:  sh_name: .note.freebsd.ident
+    sh_addr:      0               sh_flags:   0
+    sh_size:      0x14            sh_type:    [ SHT_NOTE ]
+    sh_offset:    0x48            sh_entsize: 0
+    sh_link:      0               sh_info:    0
+    sh_addralign: 0x1
+
+Section Header[4]:  sh_name: .note.freebsd.march
+    sh_addr:      0               sh_flags:   0
+    sh_size:      0x1c            sh_type:    [ SHT_NOTE ]
+    sh_offset:    0x5c            sh_entsize: 0
+    sh_link:      0               sh_info:    0
+    sh_addralign: 0x1
+
+Section Header[5]:  sh_name: .note.my_section
+    sh_addr:      0               sh_flags:   0
+    sh_size:      0x38            sh_type:    [ SHT_NOTE ]
+    sh_offset:    0x78            sh_entsize: 0
+    sh_link:      0               sh_info:    0
+    sh_addralign: 0x1
+
+Section Header[6]:  sh_name: .symtab
+    sh_addr:      0               sh_flags:   0
+    sh_size:      0xc0            sh_type:    [ SHT_SYMTAB ]
+    sh_offset:    0xb0            sh_entsize: 0x18
+    sh_link:      1               sh_info:    7
+    sh_addralign: 0x8
+
+Symbol Table Section:  .symtab
+     index        value           size     type bind oth ver shndx       name
+       [0]      0x00000000 0x000000000000  NOTY LOCL  D    0 UNDEF       
+       [1]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.freeb $d.0
+       [2]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.freeb $d.1
+       [3]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.my_se entry1
+       [4]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.my_se $d.2
+       [5]      0x0000001c 0x000000000000  NOTY LOCL  D    0 .note.my_se entry2
+       [6]      0x00000000 0x000000000000  NOTY LOCL  D    0 .text       $x.3
+       [7]      0x00000000 0x000000000008  NOTY GLOB  D    0 .text       main
Index: test/elfdump/ts/exec3/@S@d%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@d%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@S@e%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@e%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@e%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@e%note_sections.out	(working copy)
@@ -0,0 +1,10 @@
+
+ELF Header
+  ei_magic:   { 0x7f, E, L, F }
+  ei_class:   ELFCLASS64          ei_data:      ELFDATA2LSB
+  e_machine:  EM_AARCH64          e_version:    EV_CURRENT
+  e_type:     ET_REL
+  e_flags:                     0
+  e_entry:                     0  e_ehsize:     64  e_shstrndx:    1
+  e_shoff:                 0x1e8  e_shentsize:  64  e_shnum:       7
+  e_phoff:                     0  e_phentsize:   0  e_phnum:       0
Index: test/elfdump/ts/exec3/@S@e@p%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@e@p%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@e@p%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@e@p%note_sections.out	(working copy)
@@ -0,0 +1,10 @@
+
+ELF Header
+  ei_magic:   { 0x7f, E, L, F }
+  ei_class:   ELFCLASS64          ei_data:      ELFDATA2LSB
+  e_machine:  EM_AARCH64          e_version:    EV_CURRENT
+  e_type:     ET_REL
+  e_flags:                     0
+  e_entry:                     0  e_ehsize:     64  e_shstrndx:    1
+  e_shoff:                 0x1e8  e_shentsize:  64  e_shnum:       7
+  e_phoff:                     0  e_phentsize:   0  e_phnum:       0
Index: test/elfdump/ts/exec3/@S@h%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@h%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@S@k%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@k%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@k%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@k%note_sections.out	(working copy)
@@ -0,0 +1,2 @@
+
+elf checksum: 0x34a
Index: test/elfdump/ts/exec3/@S@n%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@n%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@n%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@n%note_sections.out	(working copy)
@@ -0,0 +1,29 @@
+
+Note Section:  .note.freebsd.ident
+
+    type   0x1
+    namesz 0x8:
+FreeBSD
+    descsz 0:
+
+Note Section:  .note.freebsd.march
+
+    type   0x2
+    namesz 0x8:
+FreeBSD
+    descsz 0x6:
+      desc[0]   61 72 6d 36   34 00
+
+Note Section:  .note.my_section
+
+    type   0x3
+    namesz 0xa:
+MySection
+    descsz 0x4:
+      desc[0]   07 00 00 00
+
+    type   0x4
+    namesz 0xb:
+MySection1
+    descsz 0x4:
+      desc[0]   30 00 00 00
Index: test/elfdump/ts/exec3/@S@r%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@r%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@S@r@N%.rela.dyn%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@r@N%.rela.dyn%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@S@s@N%.symtab%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@s@N%.symtab%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@S@s@N%.symtab%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@S@s@N%.symtab%note_sections.out	(working copy)
@@ -0,0 +1,11 @@
+
+Symbol Table Section:  .symtab
+     index        value           size     type bind oth ver shndx       name
+       [0]      0x00000000 0x000000000000  NOTY LOCL  D    0 UNDEF       
+       [1]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.freeb $d.0
+       [2]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.freeb $d.1
+       [3]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.my_se entry1
+       [4]      0x00000000 0x000000000000  NOTY LOCL  D    0 .note.my_se $d.2
+       [5]      0x0000001c 0x000000000000  NOTY LOCL  D    0 .note.my_se entry2
+       [6]      0x00000000 0x000000000000  NOTY LOCL  D    0 .text       $x.3
+       [7]      0x00000000 0x000000000008  NOTY GLOB  D    0 .text       main
Index: test/elfdump/ts/exec3/@S@v%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@S@v%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@c%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@c%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@c%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@c%note_sections.out	(working copy)
@@ -0,0 +1,86 @@
+
+section header:
+
+entry: 0
+	sh_name: 
+	sh_type: SHT_NULL
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 0
+	sh_size: 0
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 0
+	sh_entsize: 0
+
+entry: 1
+	sh_name: .strtab
+	sh_type: SHT_STRTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 368
+	sh_size: 119
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 2
+	sh_name: .text
+	sh_type: SHT_PROGBITS
+	sh_flags: SHF_ALLOC|SHF_EXECINSTR
+	sh_addr: 0
+	sh_offset: 64
+	sh_size: 8
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 4
+	sh_entsize: 0
+
+entry: 3
+	sh_name: .note.freebsd.ident
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 72
+	sh_size: 20
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 4
+	sh_name: .note.freebsd.march
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 92
+	sh_size: 28
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 5
+	sh_name: .note.my_section
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 120
+	sh_size: 56
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 6
+	sh_name: .symtab
+	sh_type: SHT_SYMTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 176
+	sh_size: 192
+	sh_link: 1
+	sh_info: 7
+	sh_addralign: 8
+	sh_entsize: 24
Index: test/elfdump/ts/exec3/@c@p@n%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@c@p@n%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@c@p@n%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@c@p@n%note_sections.out	(working copy)
@@ -0,0 +1,96 @@
+
+section header:
+
+entry: 0
+	sh_name: 
+	sh_type: SHT_NULL
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 0
+	sh_size: 0
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 0
+	sh_entsize: 0
+
+entry: 1
+	sh_name: .strtab
+	sh_type: SHT_STRTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 368
+	sh_size: 119
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 2
+	sh_name: .text
+	sh_type: SHT_PROGBITS
+	sh_flags: SHF_ALLOC|SHF_EXECINSTR
+	sh_addr: 0
+	sh_offset: 64
+	sh_size: 8
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 4
+	sh_entsize: 0
+
+entry: 3
+	sh_name: .note.freebsd.ident
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 72
+	sh_size: 20
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 4
+	sh_name: .note.freebsd.march
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 92
+	sh_size: 28
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 5
+	sh_name: .note.my_section
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 120
+	sh_size: 56
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 6
+	sh_name: .symtab
+	sh_type: SHT_SYMTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 176
+	sh_size: 192
+	sh_link: 1
+	sh_info: 7
+	sh_addralign: 8
+	sh_entsize: 24
+
+note (.note.freebsd.ident):
+	FreeBSD 0 (1)
+
+note (.note.freebsd.march):
+	FreeBSD 913142369 (2)
+
+note (.note.my_section):
+	MySection 7 (3)
+	MySection1 48 (4)
Index: test/elfdump/ts/exec3/@c@s%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@c@s%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@c@s%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@c@s%note_sections.out	(working copy)
@@ -0,0 +1,144 @@
+
+section header:
+
+entry: 0
+	sh_name: 
+	sh_type: SHT_NULL
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 0
+	sh_size: 0
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 0
+	sh_entsize: 0
+
+entry: 1
+	sh_name: .strtab
+	sh_type: SHT_STRTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 368
+	sh_size: 119
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 2
+	sh_name: .text
+	sh_type: SHT_PROGBITS
+	sh_flags: SHF_ALLOC|SHF_EXECINSTR
+	sh_addr: 0
+	sh_offset: 64
+	sh_size: 8
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 4
+	sh_entsize: 0
+
+entry: 3
+	sh_name: .note.freebsd.ident
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 72
+	sh_size: 20
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 4
+	sh_name: .note.freebsd.march
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 92
+	sh_size: 28
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 5
+	sh_name: .note.my_section
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 120
+	sh_size: 56
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 6
+	sh_name: .symtab
+	sh_type: SHT_SYMTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 176
+	sh_size: 192
+	sh_link: 1
+	sh_info: 7
+	sh_addralign: 8
+	sh_entsize: 24
+
+symbol table (.symtab):
+
+entry: 0
+	st_name: 
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 0
+
+entry: 1
+	st_name: $d.0
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 3
+
+entry: 2
+	st_name: $d.1
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 4
+
+entry: 3
+	st_name: entry1
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 4
+	st_name: $d.2
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 5
+	st_name: entry2
+	st_value: 0x1c
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 6
+	st_name: $x.3
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 2
+
+entry: 7
+	st_name: main
+	st_value: 0
+	st_size: 8
+	st_info: STT_NOTYPE STB_GLOBAL
+	st_shndx: 2
Index: test/elfdump/ts/exec3/@d%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@d%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@e%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@e%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@e%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@e%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@e@d%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@e@d%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@e@d%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@e@d%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@e@i%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@e@i%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@e@i%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@e@i%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@e@p%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@e@p%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@e@p%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@e@p%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@e@p@c@d%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@e@p@c@d%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@e@p@c@d%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@e@p@c@d%note_sections.out	(working copy)
@@ -0,0 +1,103 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
+
+section header:
+
+entry: 0
+	sh_name: 
+	sh_type: SHT_NULL
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 0
+	sh_size: 0
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 0
+	sh_entsize: 0
+
+entry: 1
+	sh_name: .strtab
+	sh_type: SHT_STRTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 368
+	sh_size: 119
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 2
+	sh_name: .text
+	sh_type: SHT_PROGBITS
+	sh_flags: SHF_ALLOC|SHF_EXECINSTR
+	sh_addr: 0
+	sh_offset: 64
+	sh_size: 8
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 4
+	sh_entsize: 0
+
+entry: 3
+	sh_name: .note.freebsd.ident
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 72
+	sh_size: 20
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 4
+	sh_name: .note.freebsd.march
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 92
+	sh_size: 28
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 5
+	sh_name: .note.my_section
+	sh_type: SHT_NOTE
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 120
+	sh_size: 56
+	sh_link: 0
+	sh_info: 0
+	sh_addralign: 1
+	sh_entsize: 0
+
+entry: 6
+	sh_name: .symtab
+	sh_type: SHT_SYMTAB
+	sh_flags: 
+	sh_addr: 0
+	sh_offset: 176
+	sh_size: 192
+	sh_link: 1
+	sh_info: 7
+	sh_addralign: 8
+	sh_entsize: 24
Index: test/elfdump/ts/exec3/@h%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@h%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/@n%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@n%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@n%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@n%note_sections.out	(working copy)
@@ -0,0 +1,10 @@
+
+note (.note.freebsd.ident):
+	FreeBSD 0 (1)
+
+note (.note.freebsd.march):
+	FreeBSD 913142369 (2)
+
+note (.note.my_section):
+	MySection 7 (3)
+	MySection1 48 (4)
Index: test/elfdump/ts/exec3/@p@e%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@p@e%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@p@e%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@p@e%note_sections.out	(working copy)
@@ -0,0 +1,17 @@
+
+elf header:
+
+	e_ident: ELFCLASS64 ELFDATA2LSB ELFOSABI_FREEBSD
+	e_type: ET_REL
+	e_machine: EM_AARCH64
+	e_version: EV_CURRENT
+	e_entry: 0
+	e_phoff: 0
+	e_shoff: 488
+	e_flags: 0
+	e_ehsize: 64
+	e_phentsize: 0
+	e_phnum: 0
+	e_shentsize: 64
+	e_shnum: 7
+	e_shstrndx: 1
Index: test/elfdump/ts/exec3/@p@n%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@p@n%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@p@n%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@p@n%note_sections.out	(working copy)
@@ -0,0 +1,10 @@
+
+note (.note.freebsd.ident):
+	FreeBSD 0 (1)
+
+note (.note.freebsd.march):
+	FreeBSD 913142369 (2)
+
+note (.note.my_section):
+	MySection 7 (3)
+	MySection1 48 (4)
Index: test/elfdump/ts/exec3/@p@s%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@p@s%note_sections.out
===================================================================
--- test/elfdump/ts/exec3/@p@s%note_sections.out	(nonexistent)
+++ test/elfdump/ts/exec3/@p@s%note_sections.out	(working copy)
@@ -0,0 +1,58 @@
+
+symbol table (.symtab):
+
+entry: 0
+	st_name: 
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 0
+
+entry: 1
+	st_name: $d.0
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 3
+
+entry: 2
+	st_name: $d.1
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 4
+
+entry: 3
+	st_name: entry1
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 4
+	st_name: $d.2
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 5
+	st_name: entry2
+	st_value: 0x1c
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 5
+
+entry: 6
+	st_name: $x.3
+	st_value: 0
+	st_size: 0
+	st_info: STT_NOTYPE STB_LOCAL
+	st_shndx: 2
+
+entry: 7
+	st_name: main
+	st_value: 0
+	st_size: 8
+	st_info: STT_NOTYPE STB_GLOBAL
+	st_shndx: 2
Index: test/elfdump/ts/exec3/@r%note_sections.err
===================================================================
Index: test/elfdump/ts/exec3/@r%note_sections.out
===================================================================
Index: test/elfdump/ts/exec3/note_sections
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/x-object

Property changes on: test/elfdump/ts/exec3/note_sections
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/x-object
\ No newline at end of property
Index: test/elfdump/ts/exec3/tc
===================================================================
--- test/elfdump/ts/exec3/tc	(nonexistent)
+++ test/elfdump/ts/exec3/tc	(working copy)
@@ -0,0 +1,185 @@
+#!/bin/sh
+
+tp1()
+{
+    run "@G%note_sections"
+}
+
+tp2()
+{
+    run "@G@e%note_sections"
+}
+
+tp3()
+{
+    run "@S@G%note_sections"
+}
+
+tp4()
+{
+    run "@S@c@s%note_sections"
+}
+
+tp5()
+{
+    run "@S@d%note_sections"
+}
+
+tp6()
+{
+    run "@S@e%note_sections"
+}
+
+tp7()
+{
+    run "@S@e@p%note_sections"
+}
+
+tp8()
+{
+    run "@S@h%note_sections"
+}
+
+tp9()
+{
+    run "@S@k%note_sections"
+}
+
+tp10()
+{
+    run "@S@n%note_sections"
+}
+
+tp11()
+{
+    run "@S@r%note_sections"
+}
+
+tp12()
+{
+    run "@S@r@N%.rela.dyn%note_sections"
+}
+
+tp13()
+{
+    run "@S@s@N%.symtab%note_sections"
+}
+
+tp14()
+{
+    run "@S@v%note_sections"
+}
+
+tp15()
+{
+    run "@c%note_sections"
+}
+
+tp16()
+{
+    run "@d%note_sections"
+}
+
+tp17()
+{
+    run "@c@p@n%note_sections"
+}
+
+tp18()
+{
+    run "@c@s%note_sections"
+}
+
+tp19()
+{
+    run "@e%note_sections"
+}
+
+tp20()
+{
+    run "@e@d%note_sections"
+}
+
+tp21()
+{
+    run "@e@i%note_sections"
+}
+
+tp22()
+{
+    run "@e@p%note_sections"
+}
+
+tp23()
+{
+    run "@e@p@c@d%note_sections"
+}
+
+tp24()
+{
+    run "@h%note_sections"
+}
+
+tp25()
+{
+    run "@n%note_sections"
+}
+
+tp26()
+{
+    run "@p@e%note_sections"
+}
+
+tp27()
+{
+    run "@p@n%note_sections"
+}
+
+tp28()
+{
+    run "@p@s%note_sections"
+}
+
+tp29()
+{
+    run "@r%note_sections"
+}
+
+
+tet_startup=""
+tet_cleanup="cleanup"
+
+iclist="ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 ic9 ic10 ic11 ic12 ic13 ic14 ic15 ic16 ic17 ic18 ic19 ic20 ic21 ic22 ic23 ic24 ic25 ic26 ic27 ic28 ic29"
+
+ic1="tp1"
+ic2="tp2"
+ic3="tp3"
+ic4="tp4"
+ic5="tp5"
+ic6="tp6"
+ic7="tp7"
+ic8="tp8"
+ic9="tp9"
+ic10="tp10"
+ic11="tp11"
+ic12="tp12"
+ic13="tp13"
+ic14="tp14"
+ic15="tp15"
+ic16="tp16"
+ic17="tp17"
+ic18="tp18"
+ic19="tp19"
+ic20="tp20"
+ic21="tp21"
+ic22="tp22"
+ic23="tp23"
+ic24="tp24"
+ic25="tp25"
+ic26="tp26"
+ic27="tp27"
+ic28="tp28"
+ic29="tp29"
+
+. $TET_SUITE_ROOT/ts/common/func.sh
+. $TET_ROOT/lib/xpg3sh/tcm.sh

Property changes on: test/elfdump/ts/exec3/tc
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: test/elfdump/tet_scen
===================================================================
--- test/elfdump/tet_scen	(revision 3987)
+++ test/elfdump/tet_scen	(working copy)
@@ -4,6 +4,7 @@
         "Starting Test Suite"
 	^exec1
 	^exec2
+	^exec3
 	^dso1
 	^dso2
 	^archive1
@@ -20,6 +21,11 @@
 	/ts/exec2/tc
 	"Complete exec2 Test"
 
+exec3
+	"Starting exec3 Test"
+	/ts/exec3/tc
+	"Complete exec3 Test"
+
 dso1
 	"Starting dso1 Test"
 	/ts/dso1/tc
Index: test/elfdump/ts/exec1/@c@p@n%ls.out
===================================================================
--- test/elfdump/ts/exec1/@c@p@n%ls.out	(revision 3987)
+++ test/elfdump/ts/exec1/@c@p@n%ls.out	(working copy)
@@ -386,4 +386,4 @@
 	sh_entsize: 0
 
 note (.note.ABI-tag):
-	FreeBSD 800074
+	FreeBSD 800074 (1)
Index: test/elfdump/ts/exec1/@n%ls.out
===================================================================
--- test/elfdump/ts/exec1/@n%ls.out	(revision 3987)
+++ test/elfdump/ts/exec1/@n%ls.out	(working copy)
@@ -1,3 +1,3 @@
 
 note (.note.ABI-tag):
-	FreeBSD 800074
+	FreeBSD 800074 (1)
Index: test/elfdump/ts/exec1/@p@n%ls.out
===================================================================
--- test/elfdump/ts/exec1/@p@n%ls.out	(revision 3987)
+++ test/elfdump/ts/exec1/@p@n%ls.out	(working copy)
@@ -72,4 +72,4 @@
 	p_align: 4
 
 note (.note.ABI-tag):
-	FreeBSD 800074
+	FreeBSD 800074 (1)
Index: test/elfdump/ts/exec2/@c@p@n%cp.out
===================================================================
--- test/elfdump/ts/exec2/@c@p@n%cp.out	(revision 3987)
+++ test/elfdump/ts/exec2/@c@p@n%cp.out	(working copy)
@@ -364,4 +364,4 @@
 	sh_entsize: 0
 
 note (.note.ABI-tag):
-	FreeBSD 701100
+	FreeBSD 701100 (1)
Index: test/elfdump/ts/exec2/@n%cp.out
===================================================================
--- test/elfdump/ts/exec2/@n%cp.out	(revision 3987)
+++ test/elfdump/ts/exec2/@n%cp.out	(working copy)
@@ -1,3 +1,3 @@
 
 note (.note.ABI-tag):
-	FreeBSD 701100
+	FreeBSD 701100 (1)
Index: test/elfdump/ts/exec2/@p@n%cp.out
===================================================================
--- test/elfdump/ts/exec2/@p@n%cp.out	(revision 3987)
+++ test/elfdump/ts/exec2/@p@n%cp.out	(working copy)
@@ -62,4 +62,4 @@
 	p_align: 4
 
 note (.note.ABI-tag):
-	FreeBSD 701100
+	FreeBSD 701100 (1)
