[1/2] Remove unneeded #ifdef checks for NT_NETBSDCORE_{AUXV,LWPSTATUS} in readelf.

Message ID YHXtq0zEZBWMqlbd@gmail.com
State New
Headers show
Series
  • [1/2] Remove unneeded #ifdef checks for NT_NETBSDCORE_{AUXV,LWPSTATUS} in readelf.
Related show

Commit Message

Frederic Cambus April 13, 2021, 7:14 p.m.
NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS are defined in elf/common.h.

binutils/ChangeLog:

	* readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
	checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
---
 binutils/ChangeLog | 5 +++++
 binutils/readelf.c | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.30.2

Comments

Luis Machado via Binutils April 14, 2021, 10:16 a.m. | #1
Hi Frederic,

> 	* readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef

> 	checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.


Approved and applied.

Cheers
   Nick

Patch

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ef0e868e1a0..d6cdd688fbd 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@ 
+2021-04-13  Frederic Cambus  <fred@statdns.com>
+
+	* readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
+	checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
+
 2021-04-13  Frederic Cambus  <fred@statdns.com>
 
 	* readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9d0104d9791..b06c50327f9 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