Do not insert non-BookE32 instructions into the hash table if the target cpu
[deliverable/binutils-gdb.git] / bfd / linker.c
index 228f088a0175de28aa3689b5714987e48c1bb8d7..242f8bd7625de2a78d9e1df12b4f69117acae91a 100644 (file)
@@ -1674,8 +1674,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
                          abort ();
 
                        if (! ((*info->callbacks->constructor)
-                              (info,
-                               c == 'I' ? true : false,
+                              (info, c == 'I',
                                h->root.string, abfd, section, value)))
                          return false;
                      }
@@ -1975,12 +1974,12 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
            else
              {
                char *w;
+               size_t len = strlen (string) + 1;
 
-               w = bfd_hash_allocate (&info->hash->table,
-                                      strlen (string) + 1);
+               w = bfd_hash_allocate (&info->hash->table, len);
                if (w == NULL)
                  return false;
-               strcpy (w, string);
+               memcpy (w, string, len);
                sub->u.i.warning = w;
              }
 
@@ -2391,7 +2390,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
         Gross.  .bss and similar sections won't have the linker_mark
         field set.  */
       if ((sym->section->flags & SEC_HAS_CONTENTS) != 0
-         && sym->section->linker_mark == false)
+         && ! sym->section->linker_mark)
        output = false;
 
       if (output)
This page took 0.024135 seconds and 4 git commands to generate.