summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-06-29 17:15:02 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2020-08-12 15:08:25 +0100
commit03c29a6faf7bd25a4ff368530e700f70363fe772 (patch)
treefeab5e5e61649e56506a5c60757013c767b784eb /bfd/elf.c
parent8fbac78b147290e696f04029ecc7ebab3a64e97d (diff)
downloadbinutils-gdb-03c29a6faf7bd25a4ff368530e700f70363fe772.tar.gz
Don't hardcode CONTEXT size for a NOTE_INFO_THREAD win32pstatus note
Don't hardcode the size of the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD win32pstatus note (since it's different on different architectures). bfd/ChangeLog: 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk> * elf.c (elfcore_grok_win32pstatus): Don't hardcode the size of the Win32 API thread CONTEXT type read from a NOTE_INFO_THREAD win32pstatus note.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 26a4d32d185..43a6cba89da 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -10178,7 +10178,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
/* sizeof (thread_info.thread_context) */
- sect->size = 716;
+ sect->size = note->descsz - 12;
/* offsetof (thread_info.thread_context) */
sect->filepos = note->descpos + 12;
sect->alignment_power = 2;