aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/binutils/binutils-2.19.51/uclibc-segfault.patch
blob: a202c1cfd4847cde4c67547a75c18843e0a8019b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- clean/binutils-2.19.51/bfd/elf32-arm.c	2009-05-22 12:58:44.000000000 +0100
+++ binutils-2.19.51/bfd/elf32-arm.c	2009-06-08 21:29:49.000000000 +0100
@@ -8960,7 +8964,7 @@ elf32_arm_fix_exidx_coverage (asection *
 	  struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
 	  Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
 	  
-	  if (hdr->sh_type != SHT_ARM_EXIDX)
+	  if (!hdr || hdr->sh_type != SHT_ARM_EXIDX)
 	    continue;
 	  
 	  if (elf_sec->linked_to)
--- clean/binutils-2.19.51/ld/emultempl/armelf.em	2009-05-22 12:58:45.000000000 +0100
+++ binutils-2.19.51/ld/emultempl/armelf.em	2009-06-08 21:26:34.000000000 +0100
@@ -309,6 +309,7 @@ gld${EMULATION_NAME}_finish (void)
 	      asection *out_sec = sec->output_section;
 
 	      if (out_sec
+		  && elf_section_data (sec)
 		  && elf_section_type (sec) == SHT_PROGBITS
 		  && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
 		  && (sec->flags & SEC_EXCLUDE) == 0