Blame SOURCES/binutils-ignore-duplicate-FDE-entries.patch

5be97c
--- binutils-2.32.orig/bfd/elf-eh-frame.c	2019-06-26 07:05:43.839194746 -0400
5be97c
+++ binutils-2.32/bfd/elf-eh-frame.c	2019-06-26 07:32:37.124219479 -0400
5be97c
@@ -2478,11 +2478,16 @@ write_dwarf_eh_frame_hdr (bfd *abfd, str
5be97c
 		  != sec->output_section->vma + val))
5be97c
 	    overflow = TRUE;
5be97c
 	  bfd_put_32 (abfd, val, contents + EH_FRAME_HDR_SIZE + i * 8 + 8);
5be97c
-	  if (i != 0
5be97c
-	      && (hdr_info->u.dwarf.array[i].initial_loc
5be97c
-		  < (hdr_info->u.dwarf.array[i - 1].initial_loc
5be97c
-		     + hdr_info->u.dwarf.array[i - 1].range)))
5be97c
-	    overlap = TRUE;
5be97c
+	  if (i != 0)
5be97c
+	    {
5be97c
+	      struct eh_frame_array_ent * this_entry = hdr_info->u.dwarf.array + i;
5be97c
+	      struct eh_frame_array_ent * prev_entry = hdr_info->u.dwarf.array + (i - 1);
5be97c
+
5be97c
+	      if (this_entry->initial_loc < prev_entry->initial_loc + prev_entry->range
5be97c
+		  && (this_entry->initial_loc != prev_entry->initial_loc
5be97c
+		      || this_entry->range != prev_entry->range))
5be97c
+		overlap = TRUE;
5be97c
+	    }
5be97c
 	}
5be97c
       if (overflow)
5be97c
 	_bfd_error_handler (_(".eh_frame_hdr entry overflow"));