[2/4] Don't apply size constraint to all win32pstatus ELF notes.

Message ID 20200703140505.26682-3-jon.turney@dronecode.org.uk
State New
Headers show
Series
  • bfd: Add support for Cygwin x86_64 core dumps
Related show

Commit Message

Jon Turney July 3, 2020, 2:05 p.m.
Don't reject any win32pstatus notes smaller than minimum size for a
NOTE_INFO_THREAD.

This only happens to work because the Cygwin dumper tool currently
writes all these notes as the largest size of the union, (which wastes
lots of space in the core dump).

bfd/ChangeLog:

2020-07-01  Jon Turney  <jon.turney@dronecode.org.uk>

	* elf.c (elfcore_grok_win32pstatus): Don't apply size constraint
	for NOTE_INFO_THREAD to all win32pstatus ELF notes.
---
 bfd/ChangeLog | 5 +++++
 bfd/elf.c     | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.27.0

Patch

diff --git a/bfd/elf.c b/bfd/elf.c
index 0990be31f54..373e285ca4f 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -10138,9 +10138,6 @@  elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
   int is_active_thread;
   bfd_vma base_addr;
 
-  if (note->descsz < 728)
-    return TRUE;
-
   if (! CONST_STRNEQ (note->namedata, "win32"))
     return TRUE;