[v1,02/14] clean-up: fix annoying spaces in binutils/readelf.c

Message ID 20250227104811.178094-3-matthieu.longo@arm.com
State New
Headers
Series Several clean-ups and refactorings before a long patch series on AArch64 build attributes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Matthieu Longo Feb. 27, 2025, 10:47 a.m. UTC
  ---
 binutils/readelf.c | 54 +++++++++++++++++++++++-----------------------
 1 file changed, 27 insertions(+), 27 deletions(-)
  

Patch

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 70d0c533f91..fbe99d690e2 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -438,7 +438,7 @@  section_index_real (const Filedata *filedata, unsigned int ndx)
 	  && ndx < filedata->file_header.e_shnum
 	  && ndx > 0);
 }
- 
+
 #define DT_VERSIONTAGIDX(tag)	(DT_VERNEEDNUM - (tag))	/* Reverse order!  */
 
 static inline bool
@@ -585,7 +585,7 @@  print_vma (uint64_t vma, print_mode mode)
       if (is_32bit_elf)
 	return printf ("%08" PRIx64, vma);
       return printf ("%016" PRIx64, vma);
-      
+
     case DEC_5:
       if (vma <= 99999)
 	return printf ("%5" PRId64, vma);
@@ -800,7 +800,7 @@  print_symbol_name (signed int width, const char * symbol)
 
 	      if (width_remaining < (nbytes * 2) + 2)
 		break;
-	  
+
 	      putchar (is_utf8 ? '<' : '{');
 	      printf ("0x");
 	      for (i = 0; i < nbytes; i++)
@@ -811,14 +811,14 @@  print_symbol_name (signed int width, const char * symbol)
 	    {
 	      if (unicode_display == unicode_highlight && isatty (1))
 		printf ("\x1B[31;47m"); /* Red.  */
-	      
+
 	      switch (nbytes)
 		{
 		case 2:
 		  if (width_remaining < 6)
 		    break;
 		  printf ("\\u%02x%02x",
-			  (bytes[0] & 0x1c) >> 2, 
+			  (bytes[0] & 0x1c) >> 2,
 			  ((bytes[0] & 0x03) << 6) | (bytes[1] & 0x3f));
 		  break;
 		case 3:
@@ -835,7 +835,7 @@  print_symbol_name (signed int width, const char * symbol)
 			  ((bytes[0] & 0x07) << 6) | ((bytes[1] & 0x3c) >> 2),
 			  ((bytes[1] & 0x03) << 6) | ((bytes[2] & 0x3c) >> 2),
 			  ((bytes[2] & 0x03) << 6) | (bytes[3] & 0x3f));
-		  
+
 		  break;
 		default:
 		  /* URG.  */
@@ -845,7 +845,7 @@  print_symbol_name (signed int width, const char * symbol)
 	      if (unicode_display == unicode_highlight && isatty (1))
 		printf ("\033[0m"); /* Default colour.  */
 	    }
-	  
+
 	  if (bytes[nbytes - 1] == 0)
 	    break;
 	}
@@ -904,7 +904,7 @@  printable_string (const char * string, unsigned int max_len)
 {
 #define NUM_STRING_BUFS   5
 #define MAX_STRING_LEN  256
-  
+
   static int   string_buf_index = 0;
   static char  string_buf [NUM_STRING_BUFS][MAX_STRING_LEN + 1];
 
@@ -918,7 +918,7 @@  printable_string (const char * string, unsigned int max_len)
 
   char         c;
   unsigned int remaining = MAX_STRING_LEN;
-  
+
   while ((c = * string ++) != 0)
     {
       if (ISCNTRL (c))
@@ -960,7 +960,7 @@  printable_string (const char * string, unsigned int max_len)
     }
 
   * buf = 0;
-  return buf_start;  
+  return buf_start;
 }
 
 /* Returns a pointer to a static buffer containing a
@@ -1793,7 +1793,7 @@  count_relr_relocations (Filedata *          filedata,
   nentries = section->sh_size / entsize;
   if (nentries == 0)
     return 0;
-  
+
   /* FIXME: This call to get_data duplicates one that follows in
      dump_relr_relocations().  They could be combined into just
      one call.  */
@@ -1928,7 +1928,7 @@  dump_relr_relocations (Filedata *          filedata,
 	    if ((entry & 1) == 1)
 	      {
 		uint64_t addr = where + (j * relr_entsize);
-		
+
 		if (first)
 		  {
 		    print_relr_addr_and_sym (filedata, symtab, nsyms, strtab, addr);
@@ -1949,7 +1949,7 @@  dump_relr_relocations (Filedata *          filedata,
   free (relrs);
   return true;
 }
-		       
+
 /* Display the contents of the relocation data found at the specified
    offset.  */
 
@@ -5475,7 +5475,7 @@  get_os_specific_segment_type (Filedata * filedata, unsigned long p_type)
 
   if (result != NULL)
     return result;
-  
+
   switch (p_type)
     {
     case PT_GNU_EH_FRAME:      return "GNU_EH_FRAME";
@@ -5552,7 +5552,7 @@  get_processor_specific_segment_type (Filedata * filedata, unsigned long p_type)
   sprintf (buff, "LOPROC+%#lx", p_type - PT_LOPROC);
   return buff;
 }
-  
+
 static const char *
 get_segment_type (Filedata * filedata, unsigned long p_type)
 {
@@ -5971,7 +5971,7 @@  get_os_specific_section_type_name (Filedata * filedata, unsigned int sh_type)
     case SHT_GNU_verdef:	      return "VERDEF";
     case SHT_GNU_verneed:	      return "VERNEED";
     case SHT_GNU_versym:	      return "VERSYM";
-      
+
     case SHT_LLVM_ODRTAB:             return "LLVM_ODRTAB";
     case SHT_LLVM_LINKER_OPTIONS:     return "LLVM_LINKER_OPTIONS";
     case SHT_LLVM_ADDRSIG:            return "LLVM_ADDRSIG";
@@ -5990,10 +5990,10 @@  get_os_specific_section_type_name (Filedata * filedata, unsigned int sh_type)
     case SHT_ANDROID_RELR:            return "ANDROID_RELR";
 
     case SHT_CHECKSUM:                return "CHECKSUM";
-      
+
       /* FIXME: Are these correct ?  If so, why do they not have #define's ?  */
     case 0x6ffffff0:		     return "VERSYM";
-      
+
     default:
       break;
     }
@@ -6216,7 +6216,7 @@  usage (FILE * stream)
   fprintf (stream, _("\
      -X --extra-sym-info Display extra information when showing symbols\n"));
   fprintf (stream, _("\
-     --no-extra-sym-info Do not display extra information when showing symbols (default)\n"));		     
+     --no-extra-sym-info Do not display extra information when showing symbols (default)\n"));
   fprintf (stream, _("\
   -n --notes             Display the contents of note sections (if present)\n"));
   fprintf (stream, _("\
@@ -6606,7 +6606,7 @@  parse_args (struct dump_data *dumpdata, int argc, char ** argv)
 	case OPTION_NO_EXTRA_SYM_INFO:
 	  extra_sym_info = false;
 	  break;
-	  
+
 #ifdef SUPPORT_DISASSEMBLY
 	case 'i':
 	  request_dump (dumpdata, DISASS_DUMP);
@@ -6766,7 +6766,7 @@  check_magic_number (Filedata * filedata, Elf_Internal_Ehdr * header)
      FIXME: It is not clear if all four bytes are used as constant magic
      valus by all compilers.  It may be necessary to recode this function if
      different tools use different length sequences.  */
-     
+
   static struct
   {
     unsigned char  magic[4];
@@ -6775,7 +6775,7 @@  check_magic_number (Filedata * filedata, Elf_Internal_Ehdr * header)
   }
   known_magic[] =
   {
-    { { 'B', 'C', 0xc0, 0xde }, 
+    { { 'B', 'C', 0xc0, 0xde },
       N_("This is a LLVM bitcode file - try using llvm-bcanalyzer\n"),
       N_("This is a LLVM bitcode file - try extracting and then using llvm-bcanalyzer\n")
     },
@@ -14296,7 +14296,7 @@  print_symbol (Filedata *           filedata,
 	    printf ("%*s", 10 - printed, "");
 	}
     }
-  
+
   /* Get the symbol's name.  For section symbols without a
      specific name use the (already computed) section name.  */
   if (ELF_ST_TYPE (psym->st_info) == STT_SECTION
@@ -16491,7 +16491,7 @@  uncompress_section_contents (bool              is_zstd,
     }
 
   uncompressed_buffer = xmalloc (uncompressed_size);
-  
+
   if (is_zstd)
     {
 #ifdef HAVE_ZSTD
@@ -16551,7 +16551,7 @@  maybe_expand_or_relocate_section (Elf_Internal_Shdr *  section,
 {
   uint64_t         section_size = section->sh_size;
   unsigned char *  start = * start_ptr;
-  
+
   if (decompress_dumps)
     {
       uint64_t new_size = section_size;
@@ -23719,8 +23719,8 @@  might_need_separate_debug_info (Filedata * filedata)
      deliberate user action.  */
   if (DEFAULT_FOR_FOLLOW_LINKS == 0 && do_follow_links)
     return true;
-  
-  if (process_links || do_syms || do_unwind 
+
+  if (process_links || do_syms || do_unwind
       || dump_any_debugging || do_dump || do_debugging)
     return true;