diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-18 13:05:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-18 13:05:25 -0700 |
commit | 94670f6cf11fc29cc6db6814b38c4305d9bcac96 (patch) | |
tree | 42fc95d47746fc2877927c69966bfbb0a73b5237 /bfd/elfxx-x86.c | |
parent | 0615127c587253a6386fe49468fd64abf827273e (diff) | |
download | gdb-94670f6cf11fc29cc6db6814b38c4305d9bcac96.zip gdb-94670f6cf11fc29cc6db6814b38c4305d9bcac96.tar.gz gdb-94670f6cf11fc29cc6db6814b38c4305d9bcac96.tar.bz2 |
Check error return from bfd_canonicalize_dynamic_reloc
Since bfd_canonicalize_dynamic_reloc returns -1 on error, check it in
_bfd_x86_elf_get_synthetic_symtab.
PR ld/22148
* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
return from bfd_canonicalize_dynamic_reloc.
Diffstat (limited to 'bfd/elfxx-x86.c')
-rw-r--r-- | bfd/elfxx-x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index c41dbef..2145308 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -1807,6 +1807,8 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd, dynrelcount = bfd_canonicalize_dynamic_reloc (abfd, dynrelbuf, dynsyms); + if (dynrelcount < 0) + return -1; /* Sort the relocs by address. */ qsort (dynrelbuf, dynrelcount, sizeof (arelent *), |