]> Git Repo - binutils.git/blobdiff - bfd/pdp11.c
x86-64: don't accept supposedly disabled MOVQ forms
[binutils.git] / bfd / pdp11.c
index 2eca67c4a7ccca221068abfa37a33e367dac0519..8992f4e5432339db696bc2096f98b2e13f0e8472 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for PDP-11 a.out binaries.
-   Copyright (C) 2001-2020 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -336,8 +336,8 @@ static int
 is_stab (int type, const char *name)
 {
   if (type == N_GSYM || type == N_FUN)
-    return (index(name, ':') != NULL);
-  return (type > N_FUN);
+    return strchr (name, ':') != NULL;
+  return type > N_FUN;
 }
 
 static int
@@ -2925,14 +2925,15 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 
       type = H_GET_8 (abfd, p->e_type);
 
-      /* Ignore debugging symbols.  */
-      if (is_stab(type, name))
-       continue;
-
       /* PR 19629: Corrupt binaries can contain illegal string offsets.  */
       if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd))
        return FALSE;
       name = strings + GET_WORD (abfd, p->e_strx);
+
+      /* Ignore debugging symbols.  */
+      if (is_stab (type, name))
+       continue;
+
       value = GET_WORD (abfd, p->e_value);
       flags = BSF_GLOBAL;
       string = NULL;
@@ -4688,6 +4689,7 @@ const bfd_target MY (vec) =
   AR_PAD_CHAR,                 /* AR_pad_char.  */
   15,                          /* AR_max_namelen.  */
   0,                           /* match priority.  */
+  TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols.  */
   bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getp32, bfd_getp_signed_32, bfd_putp32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data.  */
This page took 0.024713 seconds and 4 git commands to generate.