ARM CMSE symbols
[external/binutils.git] / bfd / elf32-m68hc1x.c
index d67d5b8..6a99678 100644 (file)
@@ -1,5 +1,5 @@
 /* Motorola 68HC11/HC12-specific support for 32-bit ELF
-   Copyright (C) 1999-2017 Free Software Foundation, Inc.
+   Copyright (C) 1999-2019 Free Software Foundation, Inc.
    Contributed by Stephane Carrez (stcarrez@nerim.fr)
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -162,7 +162,7 @@ m68hc12_add_stub (const char *stub_name, asection *section,
   if (stub_entry == NULL)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: cannot create stub entry %s"),
+      _bfd_error_handler (_("%pB: cannot create stub entry %s"),
                          section->owner, stub_name);
       return NULL;
     }
@@ -890,9 +890,7 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info,
        /* This relocation describes which C++ vtable entries are actually
           used.  Record for later use during GC.  */
        case R_M68HC11_GNU_VTENTRY:
-         BFD_ASSERT (h != NULL);
-         if (h != NULL
-             && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+         if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
            return FALSE;
          break;
        }
@@ -963,7 +961,8 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          || r_type == R_M68HC11_GNU_VTINHERIT)
        continue;
 
-      (*ebd->elf_info_to_howto_rel) (input_bfd, &arel, rel);
+      if (! (*ebd->elf_info_to_howto_rel) (input_bfd, &arel, rel))
+       continue;
       howto = arel.howto;
 
       h = NULL;
@@ -1112,7 +1111,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          /* Get virtual address of instruction having the relocation.  */
          if (is_far)
            {
-             msg = _("Reference to the far symbol `%s' using a wrong "
+             msg = _("reference to the far symbol `%s' using a wrong "
                      "relocation may result in incorrect execution");
              buf = xmalloc (strlen (msg) + strlen (name) + 10);
              sprintf (buf, msg, name);
@@ -1348,14 +1347,14 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
     {
       _bfd_error_handler
-       (_("%B: linking files compiled for 16-bit integers (-mshort) "
+       (_("%pB: linking files compiled for 16-bit integers (-mshort) "
           "and others for 32-bit integers"), ibfd);
       ok = FALSE;
     }
   if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
     {
       _bfd_error_handler
-       (_("%B: linking files compiled for 32-bit double (-fshort-double) "
+       (_("%pB: linking files compiled for 32-bit double (-fshort-double) "
           "and others for 64-bit double"), ibfd);
       ok = FALSE;
     }
@@ -1364,7 +1363,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags))
     {
       _bfd_error_handler
-       (_("%B: linking files compiled for HCS12 with "
+       (_("%pB: linking files compiled for HCS12 with "
           "others compiled for HC12"), ibfd);
       ok = FALSE;
     }
@@ -1381,7 +1380,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: uses different e_flags (%#x) fields than previous modules (%#x)"),
+       (_("%pB: uses different e_flags (%#x) fields than previous modules (%#x)"),
         ibfd, new_flags, old_flags);
       ok = FALSE;
     }
@@ -1455,6 +1454,8 @@ elf32_m68hc11_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
   struct m68hc11_scan_param param;
   struct m68hc11_elf_link_hash_table *htab;
 
+  _bfd_elf_post_process_headers (abfd, link_info);
+
   if (link_info == NULL)
     return;