diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-04-01 13:16:46 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-04-01 13:16:46 -0700 |
commit | e330d4c033eab2e0e7206a29d6c11a9a59fd205b (patch) | |
tree | b536b16e5445574ab7c4662f3bc8e608f349fd49 /bfd | |
parent | fd46a69ed42ce16fbbf5a20dffca9228a3647019 (diff) | |
download | gdb-e330d4c033eab2e0e7206a29d6c11a9a59fd205b.zip gdb-e330d4c033eab2e0e7206a29d6c11a9a59fd205b.tar.gz gdb-e330d4c033eab2e0e7206a29d6c11a9a59fd205b.tar.bz2 |
elfcore_grok_freebsd_note: Remove checks of note->namesz.
This function is only called if the note name is "FreeBSD", so
checking the name size is unnecessary.
bfd/ChangeLog:
* elf.c (elfcore_grok_freebsd_note): Remove checks for namesz.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 86d42b2..1fcb8d9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2022-04-01 John Baldwin <jhb@FreeBSD.org> + + * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz. + 2022-03-22 Steiner H Gunderson <steinar+sourceware@gunderson.no> * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is @@ -11010,10 +11010,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_grok_freebsd_psinfo (abfd, note); case NT_FREEBSD_THRMISC: - if (note->namesz == 8) - return elfcore_make_note_pseudosection (abfd, ".thrmisc", note); - else - return true; + return elfcore_make_note_pseudosection (abfd, ".thrmisc", note); case NT_FREEBSD_PROCSTAT_PROC: return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.proc", @@ -11031,10 +11028,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_auxv_note_section (abfd, note, 4); case NT_X86_XSTATE: - if (note->namesz == 8) - return elfcore_grok_xstatereg (abfd, note); - else - return true; + return elfcore_grok_xstatereg (abfd, note); case NT_FREEBSD_PTLWPINFO: return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.lwpinfo", |