x86: drop L1OM/K1OM support from ld
[binutils-gdb.git] / ld / ldbuildid.c
index c0e91bcefc975716a4a499a42495e818fb3ecc49..7448dcb7d0818172c068832bfe99da71b52f55d3 100644 (file)
@@ -1,5 +1,5 @@
 /* ldbuildid.c - Build Id support routines
-   Copyright (C) 2013-2021 Free Software Foundation, Inc.
+   Copyright (C) 2013-2022 Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
 
 #endif
 
 #define streq(a,b)     strcmp ((a), (b)) == 0
-#define strneq(a,b,n)  strncmp ((a), (b), (n)) == 0
 
 bool
 validate_build_id_style (const char *style)
 {
   if ((streq (style, "md5")) || (streq (style, "sha1"))
-      || (streq (style, "uuid")) || (strneq (style, "0x", 2)))
+      || (streq (style, "uuid")) || (startswith (style, "0x")))
     return true;
 
   return false;
@@ -51,7 +50,7 @@ compute_build_id_size (const char *style)
   if (streq (style, "sha1"))
     return 160 / 8;
 
-  if (strneq (style, "0x", 2))
+  if (startswith (style, "0x"))
     {
       bfd_size_type size = 0;
       /* ID is in string form (hex).  Count the bytes.  */
@@ -156,7 +155,7 @@ generate_build_id (bfd *abfd,
              (size_t) size < sizeof (UUID) ? (size_t) size : sizeof (UUID));
 #endif /* __MINGW32__ */
     }
-  else if (strneq (style, "0x", 2))
+  else if (startswith (style, "0x"))
     {
       /* ID is in string form (hex).  Convert to bits.  */
       const char *id = style + 2;