]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.h
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Sep 2012 18:30:57 +0000 (11:30 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Sep 2012 18:30:57 +0000 (11:30 -0700)
ChangeLog
elf/dl-runtime.c
elf/dl-version.c
elf/do-rel.h
elf/dynamic-link.h
elf/rtld.c
sysdeps/generic/ldsodefs.h
sysdeps/sparc/sparc32/dl-machine.h
sysdeps/sparc/sparc64/dl-machine.h
sysdeps/x86_64/dl-tlsdesc.h

index 16e37d12fa7af2be89cec7bbed4d880c7112554f..4374c71f229a3505e2d34178fee9968ebb9c716f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2012-09-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf/dl-runtime.c (VERSYMIDX): Removed.
+       * elf/dl-version.c (VERSYMIDX): Likewise.
+       * elf/do-rel.h (VERSYMIDX): Likewise.
+       (VALIDX): Likewise.
+       * elf/dynamic-link.h (VERSYMIDX): Likewise.
+       * elf/rtld.c (VALIDX): Likewise.
+       (ADDRIDX): Likewise.
+       * sysdeps/generic/ldsodefs.h (VERSYMIDX): New macro.
+       (VALIDX): Likewise.
+       (ADDRIDX): Likewise.
+       * sysdeps/sparc/sparc32/dl-machine.h (VALIDX): Likewise.
+       * sysdeps/sparc/sparc64/dl-machine.h (VALIDX): Likewise.
+       * sysdeps/x86_64/dl-tlsdesc.h (ADDRIDX): Likewise.
+
 2012-09-28  Pino Toscano  <toscano.pino@tiscali.it>
 
        * sysdeps/pthread/aio_fsync.c: Fix the file mode checking.
index fdaa364c64962aec6b0187bfec1b6846e4a57b26..2e02a218e6b972a15a9c3f068b2bb3ae20d48351 100644 (file)
 # define PLTREL  ElfW(Rel)
 #endif
 
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym)        (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
 /* The fixup functions might have need special attributes.  If none
    are provided define the macro as empty.  */
 #ifndef ARCH_FIXUP_ATTRIBUTE
index af7f89960df46b233ff9118c9eecf5a7302dda00..b2ebb165121bf40db06a8364fa7c9001dec369d7 100644 (file)
 #include <assert.h>
 
 
-#ifndef VERSYMIDX
-# define VERSYMIDX(tag)        (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
-#endif
-
-
 #define make_string(string, rest...) \
   ({                                                                         \
     const char *all[] = { string, ## rest };                                 \
index 10d8f31c4e0ab153c0ce217efd07c5dcd23c3ea7..272b7821dd1c665c81807f1c6d72be2749f7e03f 100644 (file)
                            (void *) (l_addr + relative->r_offset))
 #endif
 
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym)        (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                     + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
 /* Perform the relocations in MAP on the running program image as specified
    by RELTAG, SZTAG.  If LAZY is nonzero, this is the first pass on PLT
    relocations; they should be set up to call _dl_runtime_resolve, rather
index 44f53b3c709aa17ff13c125bdd5ee70872efaf28..d982c52ed3c45b0772c2f3e3c529161ab7b49728 100644 (file)
@@ -88,10 +88,6 @@ elf_machine_lazy_rel (struct link_map *map,
 
 #include <dl-machine.h>
 
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym)        (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
 
 /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
 #ifndef RESOLVE_MAP
index ed0a86bb3d7f81d4c089e5b3c1b4c82254e2d740..ed5d06298e13d623600dc3213dcfc0e0a0c0b6d7 100644 (file)
@@ -254,15 +254,6 @@ RTLD_START
 # error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
 #endif
 
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                     + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-#ifndef ADDRIDX
-# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                      + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
-#endif
-
 /* This is the second half of _dl_start (below).  It can be inlined safely
    under DONT_USE_BOOTSTRAP_MAP, where it is careful not to make any GOT
    references.  When the tools don't permit us to avoid using a GOT entry
index 72048eab7f001d68358d894dda313cd83f1d91f7..c667e34244f3a313fdd9d01dc66ec81053451d39 100644 (file)
 
 __BEGIN_DECLS
 
+#define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
+#define VALIDX(tag)    (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
+                        + DT_EXTRANUM + DT_VALTAGIDX (tag))
+#define ADDRIDX(tag)   (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
+                        + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
+
 /* 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)
index 2dfeeb27a3b5d1d47046531492518f6cca705447..04ce7854a1b4f64cd3f5b367db49d2d025b978bb 100644 (file)
 #include <tls.h>
 #include <dl-plt.h>
 
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                     + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
 /* Return nonzero iff ELF header is compatible with the running host.  */
 static inline int
 elf_machine_matches_host (const Elf32_Ehdr *ehdr)
index 2f8bbe17862ed62a2e371ad7dc99274c061a77b6..dec2fa0808a16da56a79174688d390ed8f486a77 100644 (file)
 #include <sysdep.h>
 #include <dl-plt.h>
 
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                     + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
 #define ELF64_R_TYPE_ID(info)  ((info) & 0xff)
 #define ELF64_R_TYPE_DATA(info) ((info) >> 8)
 
index 06ede02148056163eee7fc78b1a07a4186f43581..ec750904fc8f0b4614778d6e9cf44fa880669bda 100644 (file)
 #ifndef _X86_64_DL_TLSDESC_H
 # define _X86_64_DL_TLSDESC_H 1
 
-/* Use this to access DT_TLSDESC_PLT and DT_TLSDESC_GOT.  */
-#ifndef ADDRIDX
-# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
-                      + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
-#endif
-
 /* Type used to represent a TLS descriptor in the GOT.  */
 struct tlsdesc
 {