summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc/include
diff options
context:
space:
mode:
authorDale S. Rahn <rahnds@cvs.openbsd.org>2000-06-13 03:42:47 +0000
committerDale S. Rahn <rahnds@cvs.openbsd.org>2000-06-13 03:42:47 +0000
commit87d6a272b4571fa7bd3e96f21394f90fed614bbd (patch)
treed2ec380949b03aaf8ff3c0465b8d77548b61a7ce /sys/arch/powerpc/include
parent737c8c92ac5bae0de1427970dff4bdd4cf9bd85e (diff)
Add dewey and SOD information to this header file, for ELF ld.so
Diffstat (limited to 'sys/arch/powerpc/include')
-rw-r--r--sys/arch/powerpc/include/link.h60
1 files changed, 59 insertions, 1 deletions
diff --git a/sys/arch/powerpc/include/link.h b/sys/arch/powerpc/include/link.h
index 817e9d2434b..fb7d41367f5 100644
--- a/sys/arch/powerpc/include/link.h
+++ b/sys/arch/powerpc/include/link.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: link.h,v 1.1 2000/01/24 04:03:23 rahnds Exp $ */
+/* $OpenBSD: link.h,v 1.2 2000/06/13 03:42:46 rahnds Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -122,4 +122,62 @@ struct link_map
unsigned int l_init_running:1; /* Nonzero while DT_INIT function runs. */
};
+/* SOD information used by ldconfig and ld.so */
+/*
+ * Maximum number of recognized shared object version numbers.
+ */
+#define MAXDEWEY 8
+
+/*
+ * Header of the hints file.
+ */
+struct hints_header {
+ long hh_magic;
+#define HH_MAGIC 011421044151
+ long hh_version; /* Interface version number */
+#define LD_HINTS_VERSION_1 1
+#define LD_HINTS_VERSION_2 2
+ long hh_hashtab; /* Location of hash table */
+ long hh_nbucket; /* Number of buckets in hashtab */
+ long hh_strtab; /* Location of strings */
+ long hh_strtab_sz; /* Size of strings */
+ long hh_ehints; /* End of hints (max offset in file) */
+ long hh_dirlist; /* Colon-separated list of srch dirs */
+};
+
+#define HH_BADMAG(hdr) ((hdr).hh_magic != HH_MAGIC)
+
+/*
+ * Hash table element in hints file.
+ */
+struct hints_bucket {
+ /* namex and pathx are indices into the string table */
+ int hi_namex; /* Library name */
+ int hi_pathx; /* Full path */
+ int hi_dewey[MAXDEWEY]; /* The versions */
+ int hi_ndewey; /* Number of version numbers */
+#define hi_major hi_dewey[0]
+#define hi_minor hi_dewey[1]
+ int hi_next; /* Next in this bucket */
+};
+
+#define _PATH_LD_HINTS "/var/run/ld.so.hints"
+
+/*
+ * A `Shared Object Descriptor' describes a shared object that is needed
+ * to complete the link edit process of the object containing it.
+ * A list of such objects (chained through `sod_next') is pointed at
+ * by `sdt_sods' in the section_dispatch_table structure.
+ */
+
+struct sod { /* Shared Object Descriptor */
+ long sod_name; /* name (relative to load address) */
+ u_int sod_library : 1, /* Searched for by library rules */
+ sod_reserved : 31;
+ short sod_major; /* major version number */
+ short sod_minor; /* minor version number */
+ long sod_next; /* next sod */
+};
+
+
#endif /* !_POWERPC_LINK_H */