Make bfd_byte an int8_t, flagword a uint32_t
[binutils-gdb.git] / bfd / aout-ns32k.c
index 1dce76446521bf1cb5ab361a0b93894100802fe4..a6865674bcfd68401e7cea217bec3fd12ef0fb4a 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for ns32k a.out-ish binaries.
-   Copyright (C) 1990-2022 Free Software Foundation, Inc.
+   Copyright (C) 1990-2023 Free Software Foundation, Inc.
    Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -21,6 +21,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#include "libbfd.h"
 #include "aout/aout64.h"
 #include "ns32k.h"
 
@@ -180,7 +181,7 @@ MY (put_reloc) (bfd *abfd,
   int r_ns32k_type;
 
   PUT_WORD (abfd, value, reloc->r_address);
-  r_length = howto->size ;     /* Size as a power of two.  */
+  r_length = bfd_log2 (bfd_get_reloc_size (howto));
   r_pcrel  = (int) howto->pc_relative; /* Relative to PC?  */
   r_ns32k_type = (howto - MY (howto_table) )/6;