summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-08-23 09:45:11 +0100
committerDongkyun Son <dongkyun.s@samsung.com>2020-04-08 16:48:45 +0900
commit883de8b0e17144b4bda10c867f5c5955f6c92baf (patch)
treeb4caa940f7122cb366afb6e9e318ee1d7944c72a
parenta6eb3329ea30667394508b8f6703aea98d87c67b (diff)
downloadbinutils-accepted/tizen_5.0_base.tar.gz
binutils-accepted/tizen_5.0_base.tar.bz2
binutils-accepted/tizen_5.0_base.zip
* elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if there is no arm data associated with the section. (cherry-picked from 6342be709e8749d0a44c02e1876ddca360bfd52f) Change-Id: Ifaa22bb56c42f8e0ac481e51d3c8137a23a63ef3
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ca7f80adc4e..eb38cfa9c88 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-23 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
+ there is no arm data associated with the section.
+
2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
PR ld/20830
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 3d4a458fe46..dbd291138cd 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -18172,7 +18172,7 @@ elf32_arm_count_additional_relocs (asection *sec)
{
struct _arm_elf_section_data *arm_data;
arm_data = get_arm_elf_section_data (sec);
- return arm_data->additional_reloc_count;
+ return arm_data == NULL ? 0 : arm_data->additional_reloc_count;
}
/* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which