xref: /freebsd/include/elf-hints.h (revision e58eb3c437974277957187cfed4b9aa0c1a1e253)
15851a365SJohn Polstra /*-
2*e58eb3c4SPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3*e58eb3c4SPedro 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  *
28a4add9a9SPeter Wemm  * $FreeBSD$
295851a365SJohn Polstra  */
305851a365SJohn Polstra 
315e6220d9SDavid E. O'Brien #ifndef	_ELF_HINTS_H_
325e6220d9SDavid E. O'Brien #define	_ELF_HINTS_H_
335851a365SJohn Polstra 
34512a3bb5SJohn Polstra /*
35512a3bb5SJohn Polstra  * Hints file produced by ldconfig.
36512a3bb5SJohn Polstra  */
37512a3bb5SJohn Polstra struct elfhints_hdr {
38512a3bb5SJohn Polstra 	u_int32_t	magic;		/* Magic number */
39512a3bb5SJohn Polstra 	u_int32_t	version;	/* File version (1) */
40512a3bb5SJohn Polstra 	u_int32_t	strtab;		/* Offset of string table in file */
41512a3bb5SJohn Polstra 	u_int32_t	strsize;	/* Size of string table */
42512a3bb5SJohn Polstra 	u_int32_t	dirlist;	/* Offset of directory list in
43512a3bb5SJohn Polstra 					   string table */
44512a3bb5SJohn Polstra 	u_int32_t	dirlistlen;	/* strlen(dirlist) */
45512a3bb5SJohn Polstra 	u_int32_t	spare[26];	/* Room for expansion */
46512a3bb5SJohn Polstra };
47512a3bb5SJohn Polstra 
48512a3bb5SJohn Polstra #define ELFHINTS_MAGIC	0x746e6845
49512a3bb5SJohn Polstra 
50512a3bb5SJohn Polstra #define _PATH_ELF_HINTS	"/var/run/ld-elf.so.hints"
51512a3bb5SJohn Polstra 
525e6220d9SDavid E. O'Brien #endif /* !_ELF_HINTS_H_ */
53