changeset 59344:b1d6fe622f8e

8244819: hsdis does not compile with binutils 2.34+ Reviewed-by: kvn, thartmann
author ysuenaga
date Tue, 19 May 2020 20:58:51 +0900
parents c14e8bf10642
children be14f631436c
files src/utils/hsdis/hsdis.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/utils/hsdis/hsdis.c	Tue May 19 02:36:17 2020 -0700
+++ b/src/utils/hsdis/hsdis.c	Tue May 19 20:58:51 2020 +0900
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * The Universal Permissive License (UPL), Version 1.0
@@ -568,7 +568,12 @@
   dinfo->arch = bfd_get_arch(abfd);
   dinfo->mach = bfd_get_mach(abfd);
   dinfo->disassembler_options = disassembler_options;
+#if BFD_VERSION >= 234000000
+  /* bfd_octets_per_byte() has 2 args since binutils 2.34 */
+  dinfo->octets_per_byte = bfd_octets_per_byte (abfd, NULL);
+#else
   dinfo->octets_per_byte = bfd_octets_per_byte (abfd);
+#endif
   dinfo->skip_zeroes = sizeof(void*) * 2;
   dinfo->skip_zeroes_at_end = sizeof(void*)-1;
   dinfo->disassembler_needs_relocs = FALSE;