This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

[committed, PATCH] x86: Return -1 if bfd_canonicalize_dynamic_reloc returns 0


Stop if bfd_canonicalize_dynamic_reloc returns 0.

I will backport it to 2.29 branch.

H.J.
----
	PR ld/22163
	* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
	-1 if bfd_canonicalize_dynamic_reloc returns 0.
---
 bfd/ChangeLog   | 6 ++++++
 bfd/elfxx-x86.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 46643eb31d..1df9691c9e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/22163
+	* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
+	-1 if bfd_canonicalize_dynamic_reloc returns 0.
+
 2017-09-22  Pedro Alves  <palves@redhat.com>
 	    Alan Modra  <amodra@gmail.com>
 
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 2145308ce3..11883ded36 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1807,7 +1807,7 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd,
 
   dynrelcount = bfd_canonicalize_dynamic_reloc (abfd, dynrelbuf,
 						dynsyms);
-  if (dynrelcount < 0)
+  if (dynrelcount <= 0)
     return -1;
 
   /* Sort the relocs by address.  */
-- 
2.13.5


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