X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-nds32.c;h=3168587560a945eba927573adbf74de89c44f750;hb=f24bdec48621f419fdc9dcd58f46891f062b7bc0;hp=a47d98e27084d1ae302278b098a9853b82235b1b;hpb=618265039f697eab9e72bb58b95fc2d32925df58;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index a47d98e270..3168587560 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -1,5 +1,5 @@ /* NDS32-specific support for 32-bit ELF. - Copyright (C) 2012-2019 Free Software Foundation, Inc. + Copyright (C) 2012-2020 Free Software Foundation, Inc. Contributed by Andes Technology Corporation. This file is part of BFD, the Binary File Descriptor library. @@ -32,6 +32,9 @@ #include "opcode/cgen.h" #include "../opcodes/nds32-opc.h" +/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */ +#define OCTETS_PER_BYTE(ABFD, SEC) 1 + /* Relocation HOWTO functions. */ static bfd_reloc_status_type nds32_elf_ignore_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); @@ -13220,7 +13223,8 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, "unused", FALSE, 0, 0, FALSE); - off = (*parent)->address * bfd_octets_per_byte (input_bfd, NULL); + off = (*parent)->address * OCTETS_PER_BYTE (input_bfd, + input_section); _bfd_clear_contents ((*parent)->howto, input_bfd, input_section, data, off); (*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;