bfd: fix STRICT_PE_FORMAT build
authorJan Beulich <jbeulich@suse.com>
Fri, 21 Apr 2023 10:05:56 +0000 (12:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 21 Apr 2023 10:05:56 +0000 (12:05 +0200)
A semicolon was missing and "name" needs to be pointer-to-const. While
adding "const" there, also add it for "sec".

bfd/coffcode.h

index 5d6be493325eccb98aa2f9afc914e1743c75097b..423f6c070ef5cd831a78511f59df8db0d94050a3 100644 (file)
@@ -5028,11 +5028,11 @@ coff_classify_symbol (bfd *abfd,
         breaks gas generated objects.  */
       if (syment->n_value == 0)
        {
-         asection *sec;
-         char * name;
+         const asection *sec;
+         const char *name;
          char buf[SYMNMLEN + 1];
 
-         name = _bfd_coff_internal_syment_name (abfd, syment, buf)
+         name = _bfd_coff_internal_syment_name (abfd, syment, buf);
          sec = coff_section_from_bfd_index (abfd, syment->n_scnum);
          if (sec != NULL && name != NULL
              && (strcmp (bfd_section_name (sec), name) == 0))