This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] _bfd_mips_elf_final_link: notify user about wrong .reginfo size
- From: Vlad Ivanov <vlad@ivanov.email>
- To: binutils at sourceware dot org
- Date: Sat, 23 Dec 2017 19:46:10 +0300
- Subject: [PATCH] _bfd_mips_elf_final_link: notify user about wrong .reginfo size
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp1j.mail.yandex.net; dkim=pass header.i=@ivanov.email
Signed-off-by: Vlad Ivanov <vlad@ivanov.email>
---
bfd/elfxx-mips.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 6a4d3e1a6a..e27327c929 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -14431,7 +14431,13 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
/* Size has been set in _bfd_mips_elf_always_size_sections. */
- BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
+ if (o->size != sizeof (Elf32_External_RegInfo)) {
+ _bfd_error_handler
+ (_("%B: .reginfo section size should be %d bytes, actual size is %d"),
+ abfd, sizeof (Elf32_External_RegInfo), o->size);
+
+ return FALSE;
+ }
/* Skip this section later on (I don't think this currently
matters, but someday it might). */
--
2.13.5