svn commit: branches/uClibc-nptl/include

sjhill at uclibc.org sjhill at uclibc.org
Mon Aug 21 04:36:47 UTC 2006


Author: sjhill
Date: 2006-08-20 21:36:47 -0700 (Sun, 20 Aug 2006)
New Revision: 15875

Log:
Merge from trunk.


Modified:
   branches/uClibc-nptl/include/link.h


Changeset:
Modified: branches/uClibc-nptl/include/link.h
===================================================================
--- branches/uClibc-nptl/include/link.h	2006-08-21 04:35:58 UTC (rev 15874)
+++ branches/uClibc-nptl/include/link.h	2006-08-21 04:36:47 UTC (rev 15875)
@@ -1,6 +1,6 @@
 /* Data structure for communication from the run-time dynamic linker for
    loaded ELF shared objects.
-   Copyright (C) 1995-1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1995-2001, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,6 +29,12 @@
 #include <tls.h>
 #endif
 
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
+# define ___LINK_H_FDPIC___
+#else
+# undef ___LINK_H_FDPIC___
+#endif
+
 /* We use this macro to refer to ELF types independent of the native wordsize.
    `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'.  */
 #define ElfW(type)	_ElfW (Elf, __ELF_NATIVE_CLASS, type)
@@ -78,7 +84,7 @@
    */
 extern ElfW(Dyn) _DYNAMIC[];
 
-#ifdef __FRV_FDPIC__
+#ifdef ___LINK_H_FDPIC___
 # include <bits/elf-fdpic.h>
 #endif
 
@@ -93,7 +99,7 @@
     /* These first few members are part of the protocol with the debugger.
        This is the same format used in SVR4.  */
 
-#ifdef __FRV_FDPIC__
+#ifdef ___LINK_H_FDPIC___
     struct elf32_fdpic_loadaddr l_addr;
 #else
     ElfW(Addr) l_addr;		/* Base address shared object is loaded at.  */
@@ -129,9 +135,51 @@
 
 #ifdef __USE_GNU
 
+#if 0
+/* Version numbers for la_version handshake interface.  */
+#define LAV_CURRENT	1
+
+/* Activity types signaled through la_activity.  */
+enum
+  {
+    LA_ACT_CONSISTENT,		/* Link map consistent again.  */
+    LA_ACT_ADD,			/* New object will be added.  */
+    LA_ACT_DELETE		/* Objects will be removed.  */
+  };
+
+/* Values representing origin of name for dynamic loading.  */
+enum
+  {
+    LA_SER_ORIG = 0x01,		/* Original name.  */
+    LA_SER_LIBPATH = 0x02,	/* Directory from LD_LIBRARY_PATH.  */
+    LA_SER_RUNPATH = 0x04,	/* Directory from RPATH/RUNPATH.  */
+    LA_SER_CONFIG = 0x08,	/* Found through ldconfig.  */
+    LA_SER_DEFAULT = 0x40,	/* Default directory.  */
+    LA_SER_SECURE = 0x80	/* Unused.  */
+  };
+
+/* Values for la_objopen return value.  */
+enum
+  {
+    LA_FLG_BINDTO = 0x01,	/* Audit symbols bound to this object.  */
+    LA_FLG_BINDFROM = 0x02	/* Audit symbols bound from this object.  */
+  };
+
+/* Values for la_symbind flags parameter.  */
+enum
+  {
+    LA_SYMB_NOPLTENTER = 0x01,	/* la_pltenter will not be called.  */
+    LA_SYMB_NOPLTEXIT = 0x02,	/* la_pltexit will not be called.  */
+    LA_SYMB_STRUCTCALL = 0x04,	/* Return value is a structure.  */
+    LA_SYMB_DLSYM = 0x08,	/* Binding due to dlsym call.  */
+    LA_SYMB_ALTVALUE = 0x10	/* Value has been changed by a previous
+				   la_symbind call.  */
+  };
+#endif
+
 struct dl_phdr_info
   {
-#ifdef __FRV_FDPIC__
+#ifdef ___LINK_H_FDPIC___
     struct elf32_fdpic_loadaddr dlpi_addr;
 #else
     ElfW(Addr) dlpi_addr;
@@ -141,26 +189,58 @@
     ElfW(Half) dlpi_phnum;
 
 #if 0
-    /* Note: the next two members were introduced after the first
+    /* Note: Following members were introduced after the first
        version of this structure was available.  Check the SIZE
-       argument passed to the dl_iterate_phdr() callback to determine
-       whether or not they are provided.  */
+       argument passed to the dl_iterate_phdr callback to determine
+       whether or not each later member is available.  */
 
     /* Incremented when a new object may have been added.  */
     unsigned long long int dlpi_adds;
     /* Incremented when an object may have been removed.  */
     unsigned long long int dlpi_subs;
+
+    /* If there is a PT_TLS segment, its module ID as used in
+       TLS relocations, else zero.  */
+    size_t dlpi_tls_modid;
+
+    /* The address of the calling thread's instance of this module's
+       PT_TLS segment, if it has one and it has been allocated
+       in the calling thread, otherwise a null pointer.  */
+    void *dlpi_tls_data;
 #endif
   };
 
 __BEGIN_DECLS
 
-extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
-					     size_t size, void *data),
-			    void *data);
+extern int dl_iterate_phdr (int (*__callback) (struct dl_phdr_info *,
+					       size_t, void *),
+			    void *__data);
 
+
+#if 0
+/* Prototypes for the ld.so auditing interfaces.  These are not
+   defined anywhere in ld.so but instead have to be provided by the
+   auditing DSO.  */
+extern unsigned int la_version (unsigned int __version);
+extern void la_activity (uintptr_t *__cookie, unsigned int __flag);
+extern char *la_objsearch (const char *__name, uintptr_t *__cookie,
+			   unsigned int __flag);
+extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid,
+				uintptr_t *__cookie);
+extern void la_preinit (uintptr_t *__cookie);
+extern uintptr_t la_symbind32 (Elf32_Sym *__sym, unsigned int __ndx,
+			       uintptr_t *__refcook, uintptr_t *__defcook,
+			       unsigned int *__flags, const char *__symname);
+extern uintptr_t la_symbind64 (Elf64_Sym *__sym, unsigned int __ndx,
+			       uintptr_t *__refcook, uintptr_t *__defcook,
+			       unsigned int *__flags, const char *__symname);
+extern unsigned int la_objclose (uintptr_t *__cookie);
+#endif
+
 __END_DECLS
 
 #endif
 
+#undef ___LINK_H_FDPIC___
+
 #endif /* link.h */




More information about the uClibc-cvs mailing list