From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Correct nds32 readelf reloc numbers
Date: Sat, 9 Apr 2022 15:33:11 +0930 [thread overview]
Message-ID: <YlEhn9/qvt9W0QPi@squeak.grove.modra.org> (raw)
This fixes the recent nds32 "FAIL: readelf -wiaoRlL dw5".
* 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. */
--
Alan Modra
Australia Development Lab, IBM
reply other threads:[~2022-04-09 6:03 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=YlEhn9/qvt9W0QPi@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).