Handle array- and string-like values in no-op pretty printers
[binutils-gdb.git] / bfd / pe-x86_64.c
index 771651aba89f259a090b49723250e322076e2c23..b9c241edc7f2db7624b4fe0cc9d24083e7caa851 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel/AMD x86_64 PECOFF files.
-   Copyright (C) 2006-2021 Free Software Foundation, Inc.
+   Copyright (C) 2006-2023 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
 #include "sysdep.h"
 #include "bfd.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "coff/x86_64.h"
 #include "coff/internal.h"
+#include "coff/pe.h"
 #include "libcoff.h"
 
 #define TARGET_SYM             x86_64_pe_vec
@@ -32,7 +36,7 @@
 #define COFF_WITH_PE
 #define COFF_WITH_pex64
 #define COFF_WITH_PE_BIGOBJ
-#define PCRELOFFSET            TRUE
+#define PCRELOFFSET            true
 #if defined (USE_MINGW64_LEADING_UNDERSCORES)
 #define TARGET_UNDERSCORE      '_'
 #else
 
 /* The function pex64_bfd_print_pdata is implemented in pei-x86_64.c
    source, but has be extended to also handle pe objects.  */
-extern bfd_boolean pex64_bfd_print_pdata (bfd *, void *);
+extern bool pex64_bfd_print_pdata (bfd *, void *);
 
 #define bfd_pe_print_pdata   pex64_bfd_print_pdata
 
-static bfd_boolean
+static bool
 pex64_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   if (bfd_link_pde (info)
@@ -79,14 +83,14 @@ pex64_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
         __executable_start for __ImageBase to support R_AMD64_IMAGEBASE
         relocation which is relative to __ImageBase.  */
       struct bfd_link_hash_entry *h, *hi;
-      hi = bfd_link_hash_lookup (info->hash, "__ImageBase", TRUE, FALSE,
-                                FALSE);
+      hi = bfd_link_hash_lookup (info->hash, "__ImageBase", true, false,
+                                false);
       if (hi->type == bfd_link_hash_new
          || hi->type == bfd_link_hash_undefined
          || hi->type == bfd_link_hash_undefweak)
        {
          h = bfd_link_hash_lookup (info->hash, "__executable_start",
-                                   TRUE, FALSE, TRUE);
+                                   true, false, true);
          hi->type = bfd_link_hash_indirect;
          hi->u.i.link = h;
        }