From: Alan Modra Date: Mon, 6 Jun 2022 05:16:39 +0000 (+0930) Subject: NONE reloc fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff50916f8bce08829e3da5cc7d43c431105204c7;p=binutils-gdb.git NONE reloc fixes Make them all zero size standard do-nothing howtos. * elf32-csky.c (csky_elf_howto_table ): Correct howto. * elf32-ft32.c (ft32_elf_howto_table ): Likewise. * elf32-gen.c (dummy): Likewise. * elf32-nds32.c (none_howto): Likewise. * elf32-nios2.c (elf_nios2_r2_howto_table_rel ): Likewise. * elf32-pru.c (elf_pru_howto_table_rel ): Likewise. * elf32-v850.c (v800_elf_howto_table ): Likewise. * elf64-gen.c (dummy): Likewise. * elfn32-mips.c (elf_mips_howto_table_rela address * OCTETS_PER_BYTE (input_bfd, diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index 74a9f98da3e..d1e5d0e7a3d 100644 --- a/bfd/elf32-nios2.c +++ b/bfd/elf32-nios2.c @@ -735,7 +735,7 @@ static reloc_howto_type elf_nios2_r2_howto_table_rel[] = { /* No relocation. */ HOWTO (R_NIOS2_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c index 30e46766c89..9e73fa62f2d 100644 --- a/bfd/elf32-pru.c +++ b/bfd/elf32-pru.c @@ -65,8 +65,8 @@ static reloc_howto_type elf_pru_howto_table_rel[] = { /* No relocation. */ HOWTO (R_PRU_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 3, /* bitsize */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 4fb17a0f6de..46d0432e63c 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1761,7 +1761,7 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] = static reloc_howto_type v800_elf_howto_table[] = { - V800_RELOC (R_V810_NONE, 0, 0, 0, dont, false, generic), /* Type = 0x30 */ + V800_RELOC (R_V810_NONE, 3, 0, 0, dont, false, generic), /* Type = 0x30 */ V800_RELOC (R_V810_BYTE, 0, 8, 0, dont, false, generic), V800_RELOC (R_V810_HWORD, 1, 16, 0, dont, false, generic), V800_RELOC (R_V810_WORD, 2, 32, 0, dont, false, generic), diff --git a/bfd/elf64-gen.c b/bfd/elf64-gen.c index 9d5f29cefa5..7e92c874126 100644 --- a/bfd/elf64-gen.c +++ b/bfd/elf64-gen.c @@ -29,7 +29,7 @@ static reloc_howto_type dummy = HOWTO (0, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 07b753f0cc1..d3414a67047 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -877,7 +877,7 @@ static reloc_howto_type elf_mips_howto_table_rela[] = /* No relocation. */ HOWTO (R_MIPS_NONE, /* type */ 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ false, /* pc_relative */ 0, /* bitpos */ diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index e0e23926f03..99c69c259f4 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -13361,7 +13361,7 @@ _bfd_elf_mips_get_relocated_section_contents { bfd_vma off; static reloc_howto_type none_howto - = HOWTO (0, 0, 0, 0, false, 0, complain_overflow_dont, NULL, + = HOWTO (0, 0, 3, 0, false, 0, complain_overflow_dont, NULL, "unused", false, 0, 0, false); off = ((*parent)->address diff --git a/bfd/reloc.c b/bfd/reloc.c index 5098e0ab09f..3d1768fe013 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -8540,7 +8540,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, { bfd_vma off; static reloc_howto_type none_howto - = HOWTO (0, 0, 0, 0, false, 0, complain_overflow_dont, NULL, + = HOWTO (0, 0, 3, 0, false, 0, complain_overflow_dont, NULL, "unused", false, 0, 0, false); off = ((*parent)->address