From 5f47741bf633596475bb8fbb0ed304be318362cd Mon Sep 17 00:00:00 2001 From: Frederic Cambus Date: Wed, 14 Apr 2021 11:15:01 +0100 Subject: [PATCH] Remove unneeded tests for definitions of NT_BSDNETCORE values. binutils* readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. bfd * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 4 ---- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 4 ---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4d715226693..d03929ae619 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2021-04-14 Frederic Cambus + + * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef + checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. + 2021-04-14 Alan Modra PR 27631 diff --git a/bfd/elf.c b/bfd/elf.c index 276fa14c0dd..ef2193b07e9 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -10945,17 +10945,13 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) since the kernel writes this note out first when it creates a core file. */ return elfcore_grok_netbsd_procinfo (abfd, note); -#ifdef NT_NETBSDCORE_AUXV case NT_NETBSDCORE_AUXV: /* NetBSD-specific Elf Auxiliary Vector data. */ return elfcore_make_auxv_note_section (abfd, note, 4); -#endif -#ifdef NT_NETBSDCORE_LWPSTATUS case NT_NETBSDCORE_LWPSTATUS: return elfcore_make_note_pseudosection (abfd, ".note.netbsdcore.lwpstatus", note); -#endif default: break; } diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 5148da4a219..daa258c4d76 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2021-04-14 Frederic Cambus + + * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef + checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. + 2021-04-14 Alan Modra PR 27716 diff --git a/binutils/readelf.c b/binutils/readelf.c index dc7764a9bb9..b404ca7017a 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -19583,15 +19583,11 @@ get_netbsd_elfcore_note_type (Filedata * filedata, unsigned e_type) /* NetBSD core "procinfo" structure. */ return _("NetBSD procinfo structure"); -#ifdef NT_NETBSDCORE_AUXV case NT_NETBSDCORE_AUXV: return _("NetBSD ELF auxiliary vector data"); -#endif -#ifdef NT_NETBSDCORE_LWPSTATUS case NT_NETBSDCORE_LWPSTATUS: return _("PT_LWPSTATUS (ptrace_lwpstatus structure)"); -#endif default: /* As of Jan 2020 there are no other machine-independent notes -- 2.30.2