From: Alan Modra Date: Sat, 9 Apr 2022 05:10:31 +0000 (+0930) Subject: Correct nds32 readelf reloc numbers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81c5e3764b2ad8f0da59011b7610ae50e1f2e2ca;p=binutils-gdb.git Correct nds32 readelf reloc numbers * readelf.c (is_32bit_abs_reloc, is_16bit_abs_reloc): Comment fixes. (is_none_reloc): Correct nds32 reloc numbers. --- diff --git a/binutils/readelf.c b/binutils/readelf.c index a9207b0178c..d45e0920788 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -14272,7 +14272,7 @@ is_32bit_abs_reloc (Filedata * filedata, unsigned int reloc_type) case EM_MT: return reloc_type == 2; /* R_MT_32. */ case EM_NDS32: - return reloc_type == 20; /* R_NDS32_RELA. */ + return reloc_type == 20; /* R_NDS32_32_RELA. */ case EM_ALTERA_NIOS2: return reloc_type == 12; /* R_NIOS2_BFD_RELOC_32. */ case EM_NIOS32: @@ -14584,7 +14584,7 @@ is_16bit_abs_reloc (Filedata * filedata, unsigned int reloc_type) case EM_MSP430_OLD: return reloc_type == 5; /* R_MSP430_16_BYTE. */ case EM_NDS32: - return reloc_type == 19; /* R_NDS32_RELA. */ + return reloc_type == 19; /* R_NDS32_16_RELA. */ case EM_ALTERA_NIOS2: return reloc_type == 13; /* R_NIOS2_BFD_RELOC_16. */ case EM_NIOS32: @@ -14845,11 +14845,11 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type) case EM_METAG: return reloc_type == 3; /* R_METAG_NONE. */ case EM_NDS32: - return (reloc_type == 0 /* R_XTENSA_NONE. */ - || reloc_type == 204 /* R_NDS32_DIFF8. */ - || reloc_type == 205 /* R_NDS32_DIFF16. */ - || reloc_type == 206 /* R_NDS32_DIFF32. */ - || reloc_type == 207 /* R_NDS32_ULEB128. */); + return (reloc_type == 0 /* R_NDS32_NONE. */ + || reloc_type == 205 /* R_NDS32_DIFF8. */ + || reloc_type == 206 /* R_NDS32_DIFF16. */ + || reloc_type == 207 /* R_NDS32_DIFF32. */ + || reloc_type == 208 /* R_NDS32_DIFF_ULEB128. */); case EM_TI_PRU: return (reloc_type == 0 /* R_PRU_NONE. */ || reloc_type == 65 /* R_PRU_DIFF8. */