summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog10
-rw-r--r--binutils/dlltool.c3
-rw-r--r--binutils/dwarf.c3
-rw-r--r--binutils/elfcomm.c8
-rw-r--r--binutils/objcopy.c2
-rw-r--r--binutils/readelf.c17
-rw-r--r--binutils/sysinfo.y4
7 files changed, 37 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4380b6381dd..8512827b4ed 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,15 @@
2016-10-06 Alan Modra <amodra@gmail.com>
+ * dlltool.c: Spell fall through comments consistently.
+ * objcopy.c: Likewise.
+ * readelf.c: Likewise.
+ * dwarf.c: Add missing fall through comments.
+ * elfcomm.c: Likewise.
+ * sysinfo.y: Likewise.
+ * readelf.c: Likewise. Also remove extraneous comments.
+
+2016-10-06 Alan Modra <amodra@gmail.com>
+
* cxxfilt.c (usage): Add ATTRIBUTE_NORETURN.
* elfedit.c (usage): Likewise.
* nm.c (usage): Likewise.
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index e116e6bf9c2..e7b40eee46d 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -2708,7 +2708,8 @@ make_one_lib_file (export_type *exp, int i, int delay)
sec->orelocation = rpp;
break;
}
- /* else fall through */
+ /* Fall through. */
+
case IDATA4:
/* An idata$4 or idata$5 is one word long, and has an
rva to idata$6. */
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index b4687e97c90..fee6a605e71 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1824,6 +1824,7 @@ read_and_display_attr_value (unsigned long attribute,
{
case DW_AT_frame_base:
have_frame_base = 1;
+ /* Fall through. */
case DW_AT_location:
case DW_AT_string_length:
case DW_AT_return_addr:
@@ -2099,6 +2100,7 @@ read_and_display_attr_value (unsigned long attribute,
case DW_AT_frame_base:
have_frame_base = 1;
+ /* Fall through. */
case DW_AT_location:
case DW_AT_string_length:
case DW_AT_return_addr:
@@ -7654,6 +7656,7 @@ dwarf_select_sections_by_letters (const char *letters)
case 'F':
do_debug_frames_interp = 1;
+ /* Fall through. */
case 'f':
do_debug_frames = 1;
break;
diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c
index b17627a2b00..1b3218649f4 100644
--- a/binutils/elfcomm.c
+++ b/binutils/elfcomm.c
@@ -165,6 +165,7 @@ byte_get_little_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 8)
| (((unsigned long) (field[2])) << 16)
| (((unsigned long) (field[3])) << 24);
+ /* Fall through. */
case 6:
if (sizeof (elf_vma) == 8)
@@ -182,6 +183,7 @@ byte_get_little_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 8)
| (((unsigned long) (field[2])) << 16)
| (((unsigned long) (field[3])) << 24);
+ /* Fall through. */
case 7:
if (sizeof (elf_vma) == 8)
@@ -200,6 +202,7 @@ byte_get_little_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 8)
| (((unsigned long) (field[2])) << 16)
| (((unsigned long) (field[3])) << 24);
+ /* Fall through. */
case 8:
if (sizeof (elf_vma) == 8)
@@ -219,6 +222,7 @@ byte_get_little_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 8)
| (((unsigned long) (field[2])) << 16)
| (((unsigned long) (field[3])) << 24);
+ /* Fall through. */
default:
error (_("Unhandled data length: %d\n"), size);
@@ -265,6 +269,7 @@ byte_get_big_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 16)
| (((unsigned long) (field[0])) << 24);
}
+ /* Fall through. */
case 6:
if (sizeof (elf_vma) == 8)
@@ -284,6 +289,7 @@ byte_get_big_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 16)
| (((unsigned long) (field[0])) << 24);
}
+ /* Fall through. */
case 7:
if (sizeof (elf_vma) == 8)
@@ -304,6 +310,7 @@ byte_get_big_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 16)
| (((unsigned long) (field[0])) << 24);
}
+ /* Fall through. */
case 8:
if (sizeof (elf_vma) == 8)
@@ -325,6 +332,7 @@ byte_get_big_endian (unsigned char *field, int size)
| (((unsigned long) (field[1])) << 16)
| (((unsigned long) (field[0])) << 24);
}
+ /* Fall through. */
default:
error (_("Unhandled data length: %d\n"), size);
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 9a64ec30e65..1821c0ce1be 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4302,7 +4302,7 @@ copy_main (int argc, char *argv[])
{
case OPTION_CHANGE_SECTION_ADDRESS:
p->vma_val = val;
- /* Drop through. */
+ /* Fall through. */
case OPTION_CHANGE_SECTION_LMA:
p->lma_val = val;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9a07158cc39..8ca8f4b33b1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -426,7 +426,7 @@ print_vma (bfd_vma vma, print_mode mode)
{
case FULL_HEX:
nc = printf ("0x");
- /* Drop through. */
+ /* Fall through. */
case LONG_HEX:
#ifdef BFD64
@@ -439,11 +439,11 @@ print_vma (bfd_vma vma, print_mode mode)
case DEC_5:
if (vma <= 99999)
return printf ("%5" BFD_VMA_FMT "d", vma);
- /* Drop through. */
+ /* Fall through. */
case PREFIX_HEX:
nc = printf ("0x");
- /* Drop through. */
+ /* Fall through. */
case HEX:
return nc + printf ("%" BFD_VMA_FMT "x", vma);
@@ -1292,6 +1292,7 @@ dump_relocations (FILE * file,
rtype = elf_msp430x_reloc_type (type);
break;
}
+ /* Fall through. */
case EM_MSP430_OLD:
rtype = elf_msp430_reloc_type (type);
break;
@@ -4450,7 +4451,7 @@ parse_args (int argc, char ** argv)
default:
/* xgettext:c-format */
error (_("Invalid option '-%c'\n"), c);
- /* Drop through. */
+ /* Fall through. */
case '?':
usage (stderr);
}
@@ -9679,6 +9680,7 @@ process_dynamic_section (FILE * file)
case DT_SYMENT :
case DT_RELENT :
dynamic_info[entry->d_tag] = entry->d_un.d_val;
+ /* Fall through. */
case DT_PLTPADSZ:
case DT_MOVEENT :
case DT_MOVESZ :
@@ -11494,6 +11496,7 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc,
case 10: /* R_MSP430_SYM_DIFF */
if (uses_msp430x_relocs ())
break;
+ /* Fall through. */
case 21: /* R_MSP430X_SYM_DIFF */
saved_sym = symtab + get_reloc_symindex (reloc->r_info);
return TRUE;
@@ -12011,6 +12014,7 @@ is_16bit_abs_reloc (unsigned int reloc_type)
case EM_MSP430:
if (uses_msp430x_relocs ())
return reloc_type == 2; /* R_MSP430_ABS16. */
+ /* Fall through. */
case EM_MSP430_OLD:
return reloc_type == 5; /* R_MSP430_16_BYTE. */
case EM_NDS32:
@@ -14241,6 +14245,7 @@ process_attributes (FILE * file,
goto do_numlist;
case 3:
printf (_("Symbol Attributes:"));
+ /* Fall through. */
do_numlist:
for (;;)
{
@@ -16418,8 +16423,8 @@ get_file_header (FILE * file)
/* Determine how to read the rest of the header. */
switch (elf_header.e_ident[EI_DATA])
{
- default: /* fall through */
- case ELFDATANONE: /* fall through */
+ default:
+ case ELFDATANONE:
case ELFDATA2LSB:
byte_get = byte_get_little_endian;
byte_put = byte_put_little_endian;
diff --git a/binutils/sysinfo.y b/binutils/sysinfo.y
index 9df3cb324c5..10fb49a8450 100644
--- a/binutils/sysinfo.y
+++ b/binutils/sysinfo.y
@@ -153,9 +153,8 @@ it:
break;
case 'g':
printf("\tchecksum(ffile,raw, idx, IT_%s_CODE);\n", it);
-
+ /* Fall through. */
case 'i':
-
case 'o':
case 'c':
printf("}\n");
@@ -182,6 +181,7 @@ repeat_it_field: '(' REPEAT NAME
printf("\tprintf(\"repeat %%d\\n\", %s);\n",$3);
if (rdepth==2)
printf("\tprintf(\"repeat %%d\\n\", %s[n]);\n",$3);
+ /* Fall through. */
case 'i':
case 'g':
case 'o':