This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix MIPS ELF32 relocation howtos


Hi All,

this fixes some relocation howtos in elf32-mips.c according to
the MIPS/SGI ELF64 ABI Draft. These are either unused yet because
of being NewABI only or the wrong definition made no difference
WRT 32bit values.


Thiemo


2001-10-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/bfd/ChangeLog
	* elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
	according to the MIPS/SGI ELF64 ABI Draft.
	(mips_elf_sort_hash_table): Typo.


diff -BurpNX /bigdisk/src/binutils-exclude src-orig/bfd/elf32-mips.c src/bfd/elf32-mips.c
--- src-orig/bfd/elf32-mips.c	Wed Oct  3 01:34:50 2001
+++ src/bfd/elf32-mips.c	Thu Oct  4 03:51:33 2001
@@ -529,7 +531,7 @@ static reloc_howto_type elf_mips_howto_t
 	 32,			/* 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_MIPS_32",		/* name */
 	 true,			/* partial_inplace */
@@ -544,7 +546,7 @@ static reloc_howto_type elf_mips_howto_t
 	 32,			/* 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_MIPS_REL32",	/* name */
 	 true,			/* partial_inplace */
@@ -682,7 +684,7 @@ static reloc_howto_type elf_mips_howto_t
 	 32,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_dont, /* complain_on_overflow */
 	 _bfd_mips_elf_gprel32_reloc, /* special_function */
 	 "R_MIPS_GPREL32",	/* name */
 	 true,			/* partial_inplace */
@@ -735,7 +737,7 @@ static reloc_howto_type elf_mips_howto_t
 	 64,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_dont, /* complain_on_overflow */
 	 mips32_64bit_reloc,	/* special_function */
 	 "R_MIPS_64",		/* name */
 	 true,			/* partial_inplace */
@@ -750,7 +752,7 @@ static reloc_howto_type elf_mips_howto_t
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_signed, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_GOT_DISP",	/* name */
 	 true,			/* partial_inplace */
@@ -765,7 +767,7 @@ static reloc_howto_type elf_mips_howto_t
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_signed, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_GOT_PAGE",	/* name */
 	 true,			/* partial_inplace */
@@ -780,7 +782,7 @@ static reloc_howto_type elf_mips_howto_t
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_signed, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_GOT_OFST",	/* name */
 	 true,			/* partial_inplace */
@@ -825,7 +827,7 @@ static reloc_howto_type elf_mips_howto_t
 	 64,			/* 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_MIPS_SUB",		/* name */
 	 true,			/* partial_inplace */
@@ -849,7 +851,7 @@ static reloc_howto_type elf_mips_howto_t
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_HIGHER",	/* name */
 	 true,			/* partial_inplace */
-	 0,			/* src_mask */
+	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -864,7 +866,7 @@ static reloc_howto_type elf_mips_howto_t
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_HIGHEST",	/* name */
 	 true,			/* partial_inplace */
-	 0,			/* src_mask */
+	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -908,7 +910,7 @@ static reloc_howto_type elf_mips_howto_t
 	 complain_overflow_dont, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_MIPS_SCN_DISP",     /* name */
-	 false,			/* partial_inplace */
+	 true,			/* partial_inplace */
 	 0xffffffff,		/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
@@ -5584,7 +5588,7 @@ mips_elf_sort_hash_table (info, max_loca
 			       mips_elf_sort_hash_table_f,
 			       &hsd);
 
-  /* There shoud have been enough room in the symbol table to
+  /* There should have been enough room in the symbol table to
      accomodate both the GOT and non-GOT symbols.  */
   BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]