mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Define VERSYMIDX/VALIDX/ADDRIDX in ldsodefs.h
This commit is contained in:
16
ChangeLog
16
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>
|
2012-09-28 Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
|
||||||
* sysdeps/pthread/aio_fsync.c: Fix the file mode checking.
|
* sysdeps/pthread/aio_fsync.c: Fix the file mode checking.
|
||||||
|
@ -36,10 +36,6 @@
|
|||||||
# define PLTREL ElfW(Rel)
|
# define PLTREL ElfW(Rel)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VERSYMIDX
|
|
||||||
# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The fixup functions might have need special attributes. If none
|
/* The fixup functions might have need special attributes. If none
|
||||||
are provided define the macro as empty. */
|
are provided define the macro as empty. */
|
||||||
#ifndef ARCH_FIXUP_ATTRIBUTE
|
#ifndef ARCH_FIXUP_ATTRIBUTE
|
||||||
|
@ -28,11 +28,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef VERSYMIDX
|
|
||||||
# define VERSYMIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define make_string(string, rest...) \
|
#define make_string(string, rest...) \
|
||||||
({ \
|
({ \
|
||||||
const char *all[] = { string, ## rest }; \
|
const char *all[] = { string, ## rest }; \
|
||||||
|
@ -32,14 +32,6 @@
|
|||||||
(void *) (l_addr + relative->r_offset))
|
(void *) (l_addr + relative->r_offset))
|
||||||
#endif
|
#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
|
/* 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
|
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
|
relocations; they should be set up to call _dl_runtime_resolve, rather
|
||||||
|
@ -88,10 +88,6 @@ elf_machine_lazy_rel (struct link_map *map,
|
|||||||
|
|
||||||
#include <dl-machine.h>
|
#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_*. */
|
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
|
||||||
#ifndef RESOLVE_MAP
|
#ifndef RESOLVE_MAP
|
||||||
|
@ -254,15 +254,6 @@ RTLD_START
|
|||||||
# error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
|
# error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
|
||||||
#endif
|
#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
|
/* 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
|
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
|
references. When the tools don't permit us to avoid using a GOT entry
|
||||||
|
@ -41,6 +41,12 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__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.
|
/* 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'. */
|
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
|
||||||
#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
|
#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
|
||||||
|
@ -29,11 +29,6 @@
|
|||||||
#include <tls.h>
|
#include <tls.h>
|
||||||
#include <dl-plt.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. */
|
/* Return nonzero iff ELF header is compatible with the running host. */
|
||||||
static inline int
|
static inline int
|
||||||
elf_machine_matches_host (const Elf32_Ehdr *ehdr)
|
elf_machine_matches_host (const Elf32_Ehdr *ehdr)
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <dl-plt.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_ID(info) ((info) & 0xff)
|
||||||
#define ELF64_R_TYPE_DATA(info) ((info) >> 8)
|
#define ELF64_R_TYPE_DATA(info) ((info) >> 8)
|
||||||
|
|
||||||
|
@ -20,12 +20,6 @@
|
|||||||
#ifndef _X86_64_DL_TLSDESC_H
|
#ifndef _X86_64_DL_TLSDESC_H
|
||||||
# define _X86_64_DL_TLSDESC_H 1
|
# 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. */
|
/* Type used to represent a TLS descriptor in the GOT. */
|
||||||
struct tlsdesc
|
struct tlsdesc
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user