[PATCH 3/6] PR binutils/22875: IQ2000/ELF: Prevent an out-of-bounds howto table access
Maciej W. Rozycki
macro@mips.com
Thu Mar 29 20:20:00 GMT 2018
Prevent an out-of-bounds `iq2000_elf_howto_table' table access in
`iq2000_info_to_howto_rela' and redefine R_IQ2000_max to hold the number
of entries in the contiguous regular IQ2000 relocation range defined and
described in the table, keeping the definitions of
R_IQ2000_GNU_VTINHERIT and R_IQ2000_GNU_VTENTRY as outliers.
include/
* elf/iq2000.h (R_IQ2000_max): Redefine as `R_IQ2000_32_DEBUG +
1'.
---
Hi,
Regression-tested successfully. OK to apply?
Maciej
---
include/elf/iq2000.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
binutils-iq2000-bfd-unsupp-reloc.diff
Index: binutils/include/elf/iq2000.h
===================================================================
--- binutils.orig/include/elf/iq2000.h 2018-02-23 14:15:47.000000000 +0000
+++ binutils/include/elf/iq2000.h 2018-03-28 17:19:48.267004721 +0100
@@ -37,7 +37,7 @@ START_RELOC_NUMBERS (elf_iq2000_reloc_ty
RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_IQ2000_max)
+END_RELOC_NUMBERS(R_IQ2000_max = R_IQ2000_32_DEBUG + 1)
#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */
#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */
More information about the Binutils
mailing list