xref: /freebsd/include/elf-hints.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
15851a365SJohn Polstra /*-
24d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3e58eb3c4SPedro F. Giffuni  *
45851a365SJohn Polstra  * Copyright (c) 1997 John D. Polstra.
55851a365SJohn Polstra  * All rights reserved.
65851a365SJohn Polstra  *
75851a365SJohn Polstra  * Redistribution and use in source and binary forms, with or without
85851a365SJohn Polstra  * modification, are permitted provided that the following conditions
95851a365SJohn Polstra  * are met:
105851a365SJohn Polstra  * 1. Redistributions of source code must retain the above copyright
115851a365SJohn Polstra  *    notice, this list of conditions and the following disclaimer.
125851a365SJohn Polstra  * 2. Redistributions in binary form must reproduce the above copyright
135851a365SJohn Polstra  *    notice, this list of conditions and the following disclaimer in the
145851a365SJohn Polstra  *    documentation and/or other materials provided with the distribution.
155851a365SJohn Polstra  *
165851a365SJohn Polstra  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
175851a365SJohn Polstra  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
185851a365SJohn Polstra  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
195851a365SJohn Polstra  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
205851a365SJohn Polstra  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
215851a365SJohn Polstra  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
225851a365SJohn Polstra  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
235851a365SJohn Polstra  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
245851a365SJohn Polstra  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
255851a365SJohn Polstra  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
265851a365SJohn Polstra  * SUCH DAMAGE.
275851a365SJohn Polstra  */
285851a365SJohn Polstra 
295e6220d9SDavid E. O'Brien #ifndef	_ELF_HINTS_H_
305e6220d9SDavid E. O'Brien #define	_ELF_HINTS_H_
315851a365SJohn Polstra 
32512a3bb5SJohn Polstra /*
33512a3bb5SJohn Polstra  * Hints file produced by ldconfig.
34512a3bb5SJohn Polstra  */
35512a3bb5SJohn Polstra struct elfhints_hdr {
36512a3bb5SJohn Polstra 	u_int32_t	magic;		/* Magic number */
37512a3bb5SJohn Polstra 	u_int32_t	version;	/* File version (1) */
38512a3bb5SJohn Polstra 	u_int32_t	strtab;		/* Offset of string table in file */
39512a3bb5SJohn Polstra 	u_int32_t	strsize;	/* Size of string table */
40512a3bb5SJohn Polstra 	u_int32_t	dirlist;	/* Offset of directory list in
41512a3bb5SJohn Polstra 					   string table */
42512a3bb5SJohn Polstra 	u_int32_t	dirlistlen;	/* strlen(dirlist) */
43512a3bb5SJohn Polstra 	u_int32_t	spare[26];	/* Room for expansion */
44512a3bb5SJohn Polstra };
45512a3bb5SJohn Polstra 
46512a3bb5SJohn Polstra #define ELFHINTS_MAGIC	0x746e6845
47512a3bb5SJohn Polstra 
48*be01082bSJessica Clarke #ifndef _PATH_ELF_HINTS
49512a3bb5SJohn Polstra #define _PATH_ELF_HINTS	"/var/run/ld-elf.so.hints"
50*be01082bSJessica Clarke #endif
51512a3bb5SJohn Polstra 
525e6220d9SDavid E. O'Brien #endif /* !_ELF_HINTS_H_ */
53