[uClibc-cvs] svn commit: branches/uClibc-nptl/ldso/include

sjhill at uclibc.org sjhill at uclibc.org
Thu May 26 03:02:55 UTC 2005


Author: sjhill
Date: 2005-05-25 21:02:55 -0600 (Wed, 25 May 2005)
New Revision: 10404

Log:
Add header file for 'ld.so' definitions. It is used by both the dynamic
linker and libpthread. Eventually we will merge this into the other header
files, but we are leaving it seperate to track changes more easily. The
linker will also be undergoing modification for TLS relocations.


Added:
   branches/uClibc-nptl/ldso/include/ldsodefs.h


Changeset:
Added: branches/uClibc-nptl/ldso/include/ldsodefs.h
===================================================================
--- branches/uClibc-nptl/ldso/include/ldsodefs.h	2005-05-26 02:52:24 UTC (rev 10403)
+++ branches/uClibc-nptl/ldso/include/ldsodefs.h	2005-05-26 03:02:55 UTC (rev 10404)
@@ -0,0 +1,69 @@
+#ifndef _LDSODEFS_H
+#define _LDSODEFS_H     1
+
+#include <features.h>
+#include <tls.h>
+
+/*
+ * MIPS NPTL - These were taken from 'string/test-string.h'
+ */
+#define GL(x) _##x
+#define GLRO(x) _##x
+
+/*
+ * MIPS NPTL - This was taken from 'sysdeps/generic/ldsodefs.h'. It is
+ *             most likely used for backtrace capability.
+ */
+extern void *__libc_stack_end;
+
+/* Get size and alignment requirements of the static TLS block.  */
+extern void _dl_get_tls_static_info (size_t *sizep, size_t *alignp)
+	internal_function;
+
+  /* Keep the conditional TLS members at the end so the layout of the
+     structure used by !USE_TLS code matches the prefix of the layout in
+     the USE_TLS rtld.  Note that `struct link_map' is conditionally
+     defined as well, so _dl_rtld_map needs to be last before this.  */
+#ifdef USE_TLS
+  /* Highest dtv index currently needed.  */
+  extern size_t _dl_tls_max_dtv_idx;
+  /* Flag signalling whether there are gaps in the module ID allocation.  */
+  extern bool _dl_tls_dtv_gaps;
+  /* Information about the dtv slots.  */
+  extern struct dtv_slotinfo_list
+  {
+    size_t len;
+    struct dtv_slotinfo_list *next;
+    struct dtv_slotinfo
+    {
+      size_t gen;
+      bool is_static;
+      struct link_map *map;
+    } slotinfo[0];
+  } *_dl_tls_dtv_slotinfo_list;
+  /* Number of modules in the static TLS block.  */
+  extern size_t _dl_tls_static_nelem;
+  /* Size of the static TLS block.  */
+  extern size_t _dl_tls_static_size;
+  /* Size actually allocated in the static TLS block.  */
+  extern size_t _dl_tls_static_used;
+  /* Alignment requirement of the static TLS block.  */
+  extern size_t _dl_tls_static_align;
+
+/* Number of additional entries in the slotinfo array of each slotinfo
+   list element.  A large number makes it almost certain take we never
+   have to iterate beyond the first element in the slotinfo list.  */
+# define TLS_SLOTINFO_SURPLUS (62)
+
+/* Number of additional slots in the dtv allocated.  */
+# define DTV_SURPLUS	(14)
+
+  /* Initial dtv of the main thread, not allocated with normal malloc.  */
+  extern void *_dl_initial_dtv;
+  /* Generation counter for the dtv.  */
+  extern size_t _dl_tls_generation;
+
+  extern void (*_dl_init_static_tls) (struct link_map *);
+#endif
+
+#endif




More information about the uClibc-cvs mailing list