Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2020 21:25:00 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359462 - head/lib/libc/gen
Message-ID:  <202003302125.02ULP0wu019539@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Mar 30 21:25:00 2020
New Revision: 359462
URL: https://svnweb.freebsd.org/changeset/base/359462

Log:
  libc: unconditionalize _NLIST_DO_ELF
  
  Suggested by:	brooks, imp

Modified:
  head/lib/libc/gen/nlist.c

Modified: head/lib/libc/gen/nlist.c
==============================================================================
--- head/lib/libc/gen/nlist.c	Mon Mar 30 20:20:15 2020	(r359461)
+++ head/lib/libc/gen/nlist.c	Mon Mar 30 21:25:00 2020	(r359462)
@@ -47,12 +47,8 @@ __FBSDID("$FreeBSD$");
 #include <unistd.h>
 #include "un-namespace.h"
 
-#define _NLIST_DO_ELF
-
-#ifdef _NLIST_DO_ELF
 #include <machine/elf.h>
 #include <elf-hints.h>
-#endif
 
 int __fdnlist(int, struct nlist *);
 int __elf_fdnlist(int, struct nlist *);
@@ -74,9 +70,7 @@ nlist(const char *name, struct nlist *list)
 static struct nlist_handlers {
 	int	(*fn)(int fd, struct nlist *list);
 } nlist_fn[] = {
-#ifdef _NLIST_DO_ELF
 	{ __elf_fdnlist },
-#endif
 };
 
 int
@@ -95,7 +89,6 @@ __fdnlist(int fd, struct nlist *list)
 
 #define	ISLAST(p)	(p->n_un.n_name == 0 || p->n_un.n_name[0] == 0)
 
-#ifdef _NLIST_DO_ELF
 static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int);
 
 /*
@@ -299,4 +292,3 @@ elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shd
 	    ELF_ST_BIND(s->st_info) == STB_WEAK)
 		nl->n_type |= N_EXT;
 }
-#endif /* _NLIST_DO_ELF */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003302125.02ULP0wu019539>