/* D10V-specific support for 32-bit ELF
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
/* This reloc does nothing. */
HOWTO (R_D10V_NONE, /* Type. */
0, /* Rightshift. */
- 3, /* Size (0 = byte, 1 = short, 2 = long). */
+ 0, /* Size. */
0, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
/* An PC Relative 10-bit relocation, shifted by 2, right container. */
HOWTO (R_D10V_10_PCREL_R, /* Type. */
2, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
8, /* Bitsize. */
true, /* PC_relative. */
0, /* Bitpos. */
/* An PC Relative 10-bit relocation, shifted by 2, left container. */
HOWTO (R_D10V_10_PCREL_L, /* Type. */
2, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
8, /* Bitsize. */
true, /* PC_relative. */
15, /* Bitpos. */
/* A 16 bit absolute relocation. */
HOWTO (R_D10V_16, /* Type. */
0, /* Rightshift. */
- 1, /* Size (0 = byte, 1 = short, 2 = long). */
+ 2, /* Size. */
16, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
/* An 18 bit absolute relocation, right shifted 2. */
HOWTO (R_D10V_18, /* Type. */
2, /* Rightshift. */
- 1, /* Size (0 = byte, 1 = short, 2 = long). */
+ 2, /* Size. */
16, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
/* A relative 18 bit relocation, right shifted by 2. */
HOWTO (R_D10V_18_PCREL, /* Type. */
2, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
16, /* Bitsize. */
true, /* PC_relative. */
0, /* Bitpos. */
/* A 32 bit absolute relocation. */
HOWTO (R_D10V_32, /* Type. */
0, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
32, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_D10V_GNU_VTINHERIT, /* Type. */
0, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
0, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
/* GNU extension to record C++ vtable member usage. */
HOWTO (R_D10V_GNU_VTENTRY, /* Type. */
0, /* Rightshift. */
- 2, /* Size (0 = byte, 1 = short, 2 = long). */
+ 4, /* Size. */
0, /* Bitsize. */
false, /* PC_relative. */
0, /* Bitpos. */
{
bfd_vma insn, val;
- switch (howto->size)
+ switch (bfd_get_reloc_size (howto))
{
- case 0:
+ case 1:
insn = bfd_get_8 (abfd, where);
break;
- case 1:
+ case 2:
insn = bfd_get_16 (abfd, where);
break;
- case 2:
+ case 4:
insn = bfd_get_32 (abfd, where);
break;
default:
addend = (addend >> howto->rightshift << howto->bitpos) & howto->dst_mask;
insn = ~howto->dst_mask;
- switch (howto->size)
+ switch (bfd_get_reloc_size (howto))
{
- case 0:
+ case 1:
insn &= bfd_get_8 (abfd, where);
insn |= addend;
bfd_put_8 (abfd, insn, where);
break;
- case 1:
+ case 2:
insn &= bfd_get_16 (abfd, where);
insn |= addend;
bfd_put_16 (abfd, insn, where);
break;
- case 2:
+ case 4:
insn &= bfd_get_32 (abfd, where);
insn |= addend;
bfd_put_32 (abfd, insn, where);