aboutsummaryrefslogtreecommitdiff
path: root/sbin/ldconfig/ldconfig.h
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1998-09-05 03:31:00 +0000
committerJohn Polstra <jdp@FreeBSD.org>1998-09-05 03:31:00 +0000
commita565ca59207a96c6f25f6f9b683311dab2b86098 (patch)
treea16bd71020478c3e78dfa9d223cae2537b673fe4 /sbin/ldconfig/ldconfig.h
parent2bfe25d193d294d6f317a8545f04001567e4b893 (diff)
downloadsrc-a565ca59207a96c6f25f6f9b683311dab2b86098.tar.gz
src-a565ca59207a96c6f25f6f9b683311dab2b86098.zip
Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints". These hints consist only of the directory search path. There is no hash table as in the a.out hints, because ELF doesn't have to search for the file with the highest minor version number. (It doesn't have minor version numbers at all.) A single run of ldconfig updates either the a.out hints or the ELF hints, but not both. The set of hints to process is selected in the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout" or "-elf" command line option. The rationale is that you probably want to search different directories for ELF than for a.out. "ldconfig -r" is faked up to produce output like we are used to, except that for ELF there are no minor version numbers. This should enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports even for ELF. I implemented the ELF functionality in a new source file, with an eye toward eliminating the a.out code entirely at some point in the future.
Notes
Notes: svn path=/head/; revision=38836
Diffstat (limited to 'sbin/ldconfig/ldconfig.h')
-rw-r--r--sbin/ldconfig/ldconfig.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/sbin/ldconfig/ldconfig.h b/sbin/ldconfig/ldconfig.h
new file mode 100644
index 000000000000..54c0d8687787
--- /dev/null
+++ b/sbin/ldconfig/ldconfig.h
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 1998 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.
+ *
+ * $Id$
+ */
+
+#ifndef LDCONFIG_H
+#define LDCONFIG_H 1
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+void list_elf_hints __P((const char *));
+void update_elf_hints __P((const char *, int, char **, int));
+__END_DECLS
+
+#endif