PR23430, Indices misspelled

Alan Modra amodra@gmail.com
Tue Jul 24 10:25:00 GMT 2018


Let's fix these everywhere.

	PR 23430
include/
	* elf/common.h (SHT_SYMTAB_SHNDX): Fix comment typo.
bfd/
	* dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
	* elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
binutils/
	* elfcomm.h (struct archive_info): Rename uses_64bit_indicies
	to uses_64bit_indices.
	* elfcomm.c (setup_archive): Update uses of above.
	* readelf.c (process_archive): Likewise.
	(get_section_type_name): Rename indicies to indices.
	(get_32bit_elf_symbols, get_64bit_elf_symbols): Likewise.
	(process_section_groups): Likewise.
cpu/
	* or1kcommon.cpu (spr-reg-indices): Fix description typo.
opcodes/
	* or1k-desc.h: Regenerate.

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 0f8257f601..8fadb5c4b6 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -345,7 +345,7 @@ const struct dwarf_debug_section dwarf_debug_sections[] =
   { NULL,			NULL },
 };
 
-/* NB/ Numbers in this enum must match up with indicies
+/* NB/ Numbers in this enum must match up with indices
    into the dwarf_debug_sections[] array above.  */
 enum dwarf_debug_section_enum
 {
diff --git a/bfd/elf.c b/bfd/elf.c
index f72182788f..efdaf2e256 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2011,7 +2011,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
   if (++ nesting > 3)
     {
       /* PR17512: A corrupt ELF binary might contain a recursive group of
-	 sections, with each the string indicies pointing to the next in the
+	 sections, with each the string indices pointing to the next in the
 	 loop.  Detect this here, by refusing to load a section that we are
 	 already in the process of loading.  We only trigger this test if
 	 we have nested at least three sections deep as normal ELF binaries
@@ -5140,7 +5140,7 @@ elf_sort_sections (const void *arg1, const void *arg2)
     {
       if (TOEND (sec2))
 	{
-	  /* If the indicies are the same, do not return 0
+	  /* If the indices are the same, do not return 0
 	     here, but continue to try the next comparison.  */
 	  if (sec1->target_index - sec2->target_index != 0)
 	    return sec1->target_index - sec2->target_index;
diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c
index 3fcd79e817..9bfc33c8f1 100644
--- a/binutils/elfcomm.c
+++ b/binutils/elfcomm.c
@@ -622,7 +622,7 @@ setup_archive (struct archive_info *arch, const char *file_name,
   arch->longnames_size = 0;
   arch->nested_member_origin = 0;
   arch->is_thin_archive = is_thin_archive;
-  arch->uses_64bit_indicies = FALSE;
+  arch->uses_64bit_indices = FALSE;
   arch->next_arhdr_offset = SARMAG;
 
   /* Read the first archive member header.  */
@@ -649,7 +649,7 @@ setup_archive (struct archive_info *arch, const char *file_name,
     }
   else if (const_strneq (arch->arhdr.ar_name, "/SYM64/         "))
     {
-      arch->uses_64bit_indicies = TRUE;
+      arch->uses_64bit_indices = TRUE;
       if (! process_archive_index_and_symbols (arch, 8, read_symbols))
 	return 1;
     }
diff --git a/binutils/elfcomm.h b/binutils/elfcomm.h
index 8a08ebfa9d..7d25815d71 100644
--- a/binutils/elfcomm.h
+++ b/binutils/elfcomm.h
@@ -65,7 +65,7 @@ struct archive_info
   unsigned long nested_member_origin;   /* Origin in the nested archive of the current member.  */
   unsigned long next_arhdr_offset;      /* Offset of the next archive header.  */
   bfd_boolean is_thin_archive;          /* TRUE if this is a thin archive.  */
-  bfd_boolean uses_64bit_indicies;      /* TRUE if the index table uses 64bit entries.  */
+  bfd_boolean uses_64bit_indices;       /* TRUE if the index table uses 64bit entries.  */
   struct ar_hdr arhdr;                  /* Current archive header.  */
 };
 
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 63d3453ea1..7c5a0266bd 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4217,7 +4217,7 @@ get_section_type_name (Filedata * filedata, unsigned int sh_type)
     case SHT_PREINIT_ARRAY:	return "PREINIT_ARRAY";
     case SHT_GNU_HASH:		return "GNU_HASH";
     case SHT_GROUP:		return "GROUP";
-    case SHT_SYMTAB_SHNDX:	return "SYMTAB SECTION INDICIES";
+    case SHT_SYMTAB_SHNDX:	return "SYMTAB SECTION INDICES";
     case SHT_GNU_verdef:	return "VERDEF";
     case SHT_GNU_verneed:	return "VERNEED";
     case SHT_GNU_versym:	return "VERSYM";
@@ -5485,7 +5485,7 @@ get_32bit_elf_symbols (Filedata *           filedata,
 	  shndx = (Elf_External_Sym_Shndx *) get_data (NULL, filedata,
 						       entry->hdr->sh_offset,
 						       1, entry->hdr->sh_size,
-						       _("symbol table section indicies"));
+						       _("symbol table section indices"));
 	  if (shndx == NULL)
 	    goto exit_point;
 	  /* PR17531: file: heap-buffer-overflow */
@@ -5598,7 +5598,7 @@ get_64bit_elf_symbols (Filedata *           filedata,
 	  shndx = (Elf_External_Sym_Shndx *) get_data (NULL, filedata,
 						       entry->hdr->sh_offset,
 						       1, entry->hdr->sh_size,
-						       _("symbol table section indicies"));
+						       _("symbol table section indices"));
 	  if (shndx == NULL)
 	    goto exit_point;
 	  /* PR17531: file: heap-buffer-overflow */
@@ -6842,7 +6842,7 @@ process_section_groups (Filedata * filedata)
 		      error (_("section [%5u] in group section [%5u] > maximum section [%5u]\n"),
 			     entry, i, filedata->file_header.e_shnum - 1);
 		      if (num_group_errors == 10)
-			warn (_("Further error messages about overlarge group section indicies suppressed\n"));
+			warn (_("Further error messages about overlarge group section indices suppressed\n"));
 		    }
 		  continue;
 		}
@@ -19027,7 +19027,7 @@ process_archive (Filedata * filedata, bfd_boolean is_thin_archive)
 	      l += strnlen (arch.sym_table + l, arch.sym_size - l) + 1;
 	    }
 
-	  if (arch.uses_64bit_indicies)
+	  if (arch.uses_64bit_indices)
 	    l = (l + 7) & ~ 7;
 	  else
 	    l += l & 1;
diff --git a/cpu/or1kcommon.cpu b/cpu/or1kcommon.cpu
index 86d440c385..c0e4f316ad 100644
--- a/cpu/or1kcommon.cpu
+++ b/cpu/or1kcommon.cpu
@@ -194,7 +194,7 @@
 
 (define-normal-enum
   spr-reg-indices
-  "special purpose register indicies"
+  "special purpose register indices"
   ()
   SPR-INDEX-
   (.map (.pmacro (args)
diff --git a/include/elf/common.h b/include/elf/common.h
index 773f378fde..3a6244dc6d 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -498,7 +498,7 @@
 #define SHT_FINI_ARRAY	  15		/* Array of ptrs to finish functions */
 #define SHT_PREINIT_ARRAY 16		/* Array of ptrs to pre-init funcs */
 #define SHT_GROUP	  17		/* Section contains a section group */
-#define SHT_SYMTAB_SHNDX  18		/* Indicies for SHN_XINDEX entries */
+#define SHT_SYMTAB_SHNDX  18		/* Indices for SHN_XINDEX entries */
 
 #define SHT_LOOS	0x60000000	/* First of OS specific semantics */
 #define SHT_HIOS	0x6fffffff	/* Last of OS specific semantics */
diff --git a/opcodes/or1k-desc.h b/opcodes/or1k-desc.h
index 6112fc130b..894a8bb462 100644
--- a/opcodes/or1k-desc.h
+++ b/opcodes/or1k-desc.h
@@ -78,7 +78,7 @@ typedef enum spr_groups {
  , SPR_GROUP_POWER, SPR_GROUP_PIC, SPR_GROUP_TICK, SPR_GROUP_FPU
 } SPR_GROUPS;
 
-/* Enum declaration for special purpose register indicies.  */
+/* Enum declaration for special purpose register indices.  */
 typedef enum spr_reg_indices {
   SPR_INDEX_SYS_VR = 0, SPR_INDEX_SYS_UPR = 1, SPR_INDEX_SYS_CPUCFGR = 2, SPR_INDEX_SYS_DMMUCFGR = 3
  , SPR_INDEX_SYS_IMMUCFGR = 4, SPR_INDEX_SYS_DCCFGR = 5, SPR_INDEX_SYS_ICCFGR = 6, SPR_INDEX_SYS_DCFGR = 7

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list