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

Message ID YHXtyw0xZ293ey6H@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:15 p.m.
NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS are defined in elf/common.h.

bfd/ChangeLog:

	* 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 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.30.2

Comments

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

> 	* elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef checks

> 	for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.


Approved and applied.

Cheers
   Nick

Patch

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1603be8e954..22b48645134 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@ 
+2021-04-13  Frederic Cambus  <fred@statdns.com>
+
+	* elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef checks
+	for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
+
 2021-04-13  Clément Chigot  <clement.chigot@atos.net>
 
 	* xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier.
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;
     }