gdb/tui: Link source and assembler scrolling .... again
[deliverable/binutils-gdb.git] / bfd / elf32-pru.c
index 054f1650f264a5930d4338a917c846bc4ff9b28d..dd2e92d3bde4f4249b8fc9fca2f2d8b0d491f8f9 100644 (file)
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for TI PRU.
-   Copyright (C) 2014-2019 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
    Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
    Based on elf32-nios2.c
 
@@ -32,6 +32,9 @@
 #include "opcode/pru.h"
 #include "libiberty.h"
 
+/* All users of this file have bfd_octets_per_byte (abfd, sec) == 1.  */
+#define OCTETS_PER_BYTE(ABFD, SEC) 1
+
 #define SWAP_VALS(A,B)               \
   do {                               \
       (A) ^= (B);                    \
@@ -537,7 +540,7 @@ pru_elf32_do_ldi32_relocate (bfd *abfd, reloc_howto_type *howto,
                             bfd_vma symbol_value, bfd_vma addend)
 {
   bfd_signed_vma relocation;
-  bfd_size_type octets = offset * bfd_octets_per_byte (abfd);
+  bfd_size_type octets = offset * OCTETS_PER_BYTE (abfd, input_section);
   bfd_byte *location;
   unsigned long in1, in2;
 
@@ -557,7 +560,7 @@ pru_elf32_do_ldi32_relocate (bfd *abfd, reloc_howto_type *howto,
   BFD_ASSERT (!howto->pc_relative);
 
   /* A hacked-up version of _bfd_relocate_contents() follows.  */
-  location = data + offset * bfd_octets_per_byte (abfd);
+  location = data + octets;
 
   BFD_ASSERT (!howto->pc_relative);
 
This page took 0.023784 seconds and 4 git commands to generate.