public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] NONE reloc fixes
@ 2022-06-08 12:03 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-06-08 12:03 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ff50916f8bce08829e3da5cc7d43c431105204c7

commit ff50916f8bce08829e3da5cc7d43c431105204c7
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jun 6 14:46:39 2022 +0930

    NONE reloc fixes
    
    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:
---
 bfd/elf32-csky.c  | 2 +-
 bfd/elf32-ft32.c  | 6 +++---
 bfd/elf32-gen.c   | 2 +-
 bfd/elf32-nds32.c | 2 +-
 bfd/elf32-nios2.c | 2 +-
 bfd/elf32-pru.c   | 4 ++--
 bfd/elf32-v850.c  | 2 +-
 bfd/elf64-gen.c   | 2 +-
 bfd/elfn32-mips.c | 2 +-
 bfd/elfxx-mips.c  | 2 +-
 bfd/reloc.c       | 2 +-
 11 files changed, 14 insertions(+), 14 deletions(-)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:03 [binutils-gdb] NONE reloc fixes Alan Modra

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).