aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-09-22 07:25:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-09-22 07:25:16 -0700
commitb69e9267d15a09ce3f3d4599eae2952dfc6df502 (patch)
tree0198e3d70b78d85340a7173b45a8329f00c5eec6 /bfd/elfxx-x86.c
parentbe2b629f6427812a24f38802ba1c472a2cbfab7d (diff)
downloadgdb-b69e9267d15a09ce3f3d4599eae2952dfc6df502.zip
gdb-b69e9267d15a09ce3f3d4599eae2952dfc6df502.tar.gz
gdb-b69e9267d15a09ce3f3d4599eae2952dfc6df502.tar.bz2
x86: Return -1 if bfd_canonicalize_dynamic_reloc returns 0
Stop if bfd_canonicalize_dynamic_reloc returns 0. PR ld/22163 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return -1 if bfd_canonicalize_dynamic_reloc returns 0.
Diffstat (limited to 'bfd/elfxx-x86.c')
-rw-r--r--bfd/elfxx-x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 2145308..11883de 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. */