* include/elf.h has been repo copied to include/elf-hints.h, and it no

longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
This commit is contained in:
David E. O'Brien 2001-05-02 23:56:21 +00:00
parent 1eb55ff65d
commit 5e6220d9d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76224
19 changed files with 33 additions and 78 deletions

View file

@ -9,7 +9,7 @@
CLEANFILES= osreldate.h version vers.c
SUBDIR= rpcsvc rpc
FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \
dlfcn.h elf.h err.h fnmatch.h fstab.h \
dlfcn.h elf-hints.h err.h fnmatch.h fstab.h \
fts.h glob.h grp.h strhash.h \
hesiod.h histedit.h ieeefp.h ifaddrs.h iso646.h langinfo.h \
libgen.h limits.h link.h locale.h malloc.h memory.h mpool.h \

View file

@ -26,11 +26,8 @@
* $FreeBSD$
*/
#ifndef _ELF_H_
#define _ELF_H_
#include <sys/types.h>
#include <machine/elf.h>
#ifndef _ELF_HINTS_H_
#define _ELF_HINTS_H_
/*
* Hints file produced by ldconfig.
@ -50,4 +47,4 @@ struct elfhints_hdr {
#define _PATH_ELF_HINTS "/var/run/ld-elf.so.hints"
#endif /* !_ELF_H_ */
#endif /* !_ELF_HINTS_H_ */

View file

@ -1,53 +0,0 @@
/*-
* Copyright (c) 1997 John D. Polstra.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _ELF_H_
#define _ELF_H_
#include <sys/types.h>
#include <machine/elf.h>
/*
* Hints file produced by ldconfig.
*/
struct elfhints_hdr {
u_int32_t magic; /* Magic number */
u_int32_t version; /* File version (1) */
u_int32_t strtab; /* Offset of string table in file */
u_int32_t strsize; /* Size of string table */
u_int32_t dirlist; /* Offset of directory list in
string table */
u_int32_t dirlistlen; /* strlen(dirlist) */
u_int32_t spare[26]; /* Room for expansion */
};
#define ELFHINTS_MAGIC 0x746e6845
#define _PATH_ELF_HINTS "/var/run/ld-elf.so.hints"
#endif /* !_ELF_H_ */

View file

@ -54,7 +54,8 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
#define _NLIST_DO_ELF
#ifdef _NLIST_DO_ELF
#include <elf.h>
#include <machine/elf.h>
#include <elf-hints.h>
#endif
int __fdnlist __P((int, struct nlist *));

View file

@ -28,11 +28,12 @@
#ifndef RTLD_H /* { */
#define RTLD_H 1
#include <machine/elf.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <elf-hints.h>
#include <link.h>
#include <elf.h>
#include <stddef.h>
#include "rtld_machdep.h"

View file

@ -32,7 +32,7 @@
#include <ctype.h>
#include <dirent.h>
#include <elf.h>
#include <elf-hints.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>

View file

@ -40,7 +40,7 @@ static const char rcsid[] =
#include <a.out.h>
#include <ctype.h>
#include <dirent.h>
#include <elf.h>
#include <elf-hints.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>

View file

@ -23,6 +23,7 @@
#include <sys/disklabel.h>
#include <sys/dirent.h>
#include <machine/bootinfo.h>
#include <machine/elf.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
@ -30,7 +31,6 @@
#include <stdarg.h>
#include <a.out.h>
#include <elf.h>
#include <btxv86.h>

View file

@ -23,6 +23,7 @@
#include <sys/disklabel.h>
#include <sys/dirent.h>
#include <machine/bootinfo.h>
#include <machine/elf.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
@ -30,7 +31,6 @@
#include <stdarg.h>
#include <a.out.h>
#include <elf.h>
#include <btxv86.h>

View file

@ -28,7 +28,8 @@
* $FreeBSD$
*/
#include <elf.h>
#include <sys/types.h>
#include <sys/elf_common.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -63,11 +63,11 @@ static const char rcsid[] =
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/sysctl.h>
#include <machine/elf.h>
#include <machine/vmparam.h>
#include <a.out.h>
#include <elf.h>
#include <err.h>
#include <fcntl.h>
#include <kvm.h>

View file

@ -29,11 +29,11 @@
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/procfs.h>
#include <machine/elf.h>
#include <vm/vm_param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <elf.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>

View file

@ -63,11 +63,11 @@ static const char rcsid[] =
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/sysctl.h>
#include <machine/elf.h>
#include <machine/vmparam.h>
#include <a.out.h>
#include <elf.h>
#include <err.h>
#include <fcntl.h>
#include <kvm.h>

View file

@ -1,8 +1,13 @@
#ifndef lint
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <machine/elf.h>
#include <elf.h>
#include <err.h>
#include <fcntl.h>
#include <string.h>

View file

@ -34,8 +34,8 @@ static const char rcsid[] =
#endif /* not lint */
#include <sys/wait.h>
#include <machine/elf.h>
#include <a.out.h>
#include <elf.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>

View file

@ -38,11 +38,11 @@ static const char rcsid[] =
#include <sys/mman.h>
#include <sys/stat.h>
#include <machine/elf.h>
#define FREEBSD_AOUT
#include <a.out.h>
#include <elf.h>
#include <link.h>
#include <stab.h>

View file

@ -1,5 +1,3 @@
/* $NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $ */
/*
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
*
@ -32,8 +30,12 @@
#include <sys/cdefs.h>
#ifndef lint
#if 0
__RCSID("$NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $");
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif
#ifndef ELFSIZE
#define ELFSIZE 32
@ -53,7 +55,7 @@ __RCSID("$NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $");
#if (defined(NLIST_ELF32) && (ELFSIZE == 32)) || \
(defined(NLIST_ELF64) && (ELFSIZE == 64))
#include <elf.h>
#include <machine/elf.h>
#define CONCAT(x,y) __CONCAT(x,y)
#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))

View file

@ -26,7 +26,8 @@
* $FreeBSD$
*/
#include <elf.h>
#include <sys/types.h>
#include <machine/elf.h>
#include "kgz.h"
/* Section header indices */

View file

@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <machine/elf.h>
#include <err.h>
#include <fcntl.h>
@ -37,7 +38,6 @@
#include <unistd.h>
#include <a.out.h>
#include <elf.h>
#include "aouthdr.h"
#include "elfhdr.h"