summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig/ldconfig.h
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-05 03:31:00 +0000
committerjdp <jdp@FreeBSD.org>1998-09-05 03:31:00 +0000
commit6c76bd6d548ca5eba7c437f4e56c952e1e9381c2 (patch)
treedab184fa80fe4435136d04ef1e0a049ea999352d /sbin/ldconfig/ldconfig.h
parentbd08049a9520d9d91e43c864ebbb2e4788219331 (diff)
downloadFreeBSD-src-6c76bd6d548ca5eba7c437f4e56c952e1e9381c2.zip
FreeBSD-src-6c76bd6d548ca5eba7c437f4e56c952e1e9381c2.tar.gz
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.
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 0000000..54c0d86
--- /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
OpenPOWER on IntegriCloud