From 9bac1d8624d3c628b473e20823fb5a154896714c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 28 Sep 2012 11:30:57 -0700 Subject: Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.h --- sysdeps/generic/ldsodefs.h | 6 ++++++ sysdeps/sparc/sparc32/dl-machine.h | 5 ----- sysdeps/sparc/sparc64/dl-machine.h | 5 ----- sysdeps/x86_64/dl-tlsdesc.h | 6 ------ 4 files changed, 6 insertions(+), 16 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 72048eab7f..c667e34244 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -41,6 +41,12 @@ __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) diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 2dfeeb27a3..04ce7854a1 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -29,11 +29,6 @@ #include #include -#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) diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 2f8bbe1786..dec2fa0808 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -27,11 +27,6 @@ #include #include -#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) diff --git a/sysdeps/x86_64/dl-tlsdesc.h b/sysdeps/x86_64/dl-tlsdesc.h index 06ede02148..ec750904fc 100644 --- a/sysdeps/x86_64/dl-tlsdesc.h +++ b/sysdeps/x86_64/dl-tlsdesc.h @@ -20,12 +20,6 @@ #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 { -- cgit 1.4.1