elf: Ignore LD_AUDIT interfaces if la_version returns 0 [BZ #24122]
[platform/upstream/glibc.git] / elf / link.h
index fdda019..7a463bc 100644 (file)
@@ -1,6 +1,6 @@
 /* Data structure for communication from the run-time dynamic linker for
    loaded ELF shared objects.
-   Copyright (C) 1995-2001, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-2019 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
@@ -14,9 +14,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifndef        _LINK_H
 #define        _LINK_H 1
@@ -87,7 +86,8 @@ struct link_map
     /* These first few members are part of the protocol with the debugger.
        This is the same format used in SVR4.  */
 
-    ElfW(Addr) l_addr;         /* Base address shared object is loaded at.  */
+    ElfW(Addr) l_addr;         /* Difference between the address in the ELF
+                                  file and the addresses in memory.  */
     char *l_name;              /* Absolute file name object was found in.  */
     ElfW(Dyn) *l_ld;           /* Dynamic section of the shared object.  */
     struct link_map *l_next, *l_prev; /* Chain of loaded objects.  */
@@ -135,7 +135,6 @@ enum
                                   la_symbind call.  */
   };
 
-
 struct dl_phdr_info
   {
     ElfW(Addr) dlpi_addr;
@@ -143,15 +142,24 @@ struct dl_phdr_info
     const ElfW(Phdr) *dlpi_phdr;
     ElfW(Half) dlpi_phnum;
 
-    /* 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;
+    __extension__ unsigned long long int dlpi_adds;
     /* Incremented when an object may have been removed.  */
-    unsigned long long int dlpi_subs;
+    __extension__ 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;
   };
 
 __BEGIN_DECLS