public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: NONE reloc fixes
Date: Wed, 8 Jun 2022 21:25:22 +0930	[thread overview]
Message-ID: <YqCOKhKG5gT9zuw2@squeak.grove.modra.org> (raw)

Make them all zero size standard do-nothing howtos.

	* elf32-csky.c (csky_elf_howto_table <R_CKCORE_NONE>): Correct howto.
	* elf32-ft32.c (ft32_elf_howto_table <R_FT32_NONE>): Likewise.
	* elf32-gen.c (dummy): Likewise.
	* elf32-nds32.c (none_howto): Likewise.
	* elf32-nios2.c (elf_nios2_r2_howto_table_rel <R_NIOS2_NONE>):
	Likewise.
	* elf32-pru.c (elf_pru_howto_table_rel <R_PRU_NONE>): Likewise.
	* elf32-v850.c (v800_elf_howto_table <R_V810_NONE>): Likewise.
	* elf64-gen.c (dummy): Likewise.
	* elfn32-mips.c (elf_mips_howto_table_rela <R_MIPS_NONE): Likewise.
	* elfxx-mips.c (none_howto): Likewise.
	* reloc.c (none_howto): Likewise.

diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c
index c601088a486..de6689f4d23 100644
--- a/bfd/elf32-csky.c
+++ b/bfd/elf32-csky.c
@@ -84,7 +84,7 @@ static reloc_howto_type csky_elf_howto_table[] =
   /* 0 */
   HOWTO (R_CKCORE_NONE,               /* type */
 	 0,                           /* rightshift */
-	 0,                           /* size */
+	 3,                           /* size */
 	 0,                           /* bitsize */
 	 false,                       /* pc_relative */
 	 0,                           /* bitpos */
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index 708d8c832ea..1371d4f0255 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -40,11 +40,11 @@ static reloc_howto_type ft32_elf_howto_table [] =
   /* This reloc does nothing.  */
   HOWTO (R_FT32_NONE,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 32,			/* bitsize */
+	 3,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_dont, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_FT32_NONE",		/* name */
 	 false,			/* partial_inplace */
diff --git a/bfd/elf32-gen.c b/bfd/elf32-gen.c
index 1b692fb425d..6587f0a5eb7 100644
--- a/bfd/elf32-gen.c
+++ b/bfd/elf32-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/elf32-nds32.c b/bfd/elf32-nds32.c
index 519c8283361..08f4707342d 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -13075,7 +13075,7 @@ nds32_elf_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 * 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

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-06-08 11:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqCOKhKG5gT9zuw2@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).