[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld 2.27: segfault on armv7h on input in 'binary' format
From: |
Nick Clifton |
Subject: |
Re: ld 2.27: segfault on armv7h on input in 'binary' format |
Date: |
Tue, 23 Aug 2016 09:48:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi redfish,
> $ touch foo.dat
> $ /usr/bin/ld -r -b binary -o /tmp/foo.o foo.dat
> Segmentation fault (core dumped)
Ah - snafu - fixed by this patch.
Cheers
Nick
bfd/ChangeLog
2016-08-23 Nick Clifton <address@hidden>
* elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
there is no arm data associated with the section.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 1eba21b..4478238 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -18688,7 +18688,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