]> code.ossystems Code Review - openembedded-core.git/blob
33bf1e8f650a8f3b537f4579f7bba37c9fbef4e8
[openembedded-core.git] /
1 From 72b09de92cc597c53b1d762882b67a17fe56846c Mon Sep 17 00:00:00 2001
2 From: Nick Clifton <nickc@redhat.com>
3 Date: Tue, 23 Aug 2016 09:45:11 +0100
4 Subject: [PATCH 16/16] Fix seg-fault in ARM linker when trying to parse a
5  binary file.
6
7         * elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
8         there is no arm data associated with the section.
9 ---
10 Upstream-Status: Backport
11 Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13  bfd/elf32-arm.c | 2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
17 index 700bec3..3fab609 100644
18 --- a/bfd/elf32-arm.c
19 +++ b/bfd/elf32-arm.c
20 @@ -18207,7 +18207,7 @@ elf32_arm_count_additional_relocs (asection *sec)
21  {
22    struct _arm_elf_section_data *arm_data;
23    arm_data = get_arm_elf_section_data (sec);
24 -  return arm_data->additional_reloc_count;
25 +  return arm_data == NULL ? 0 : arm_data->additional_reloc_count;
26  }
27  
28  /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which
29 -- 
30 2.10.1
31