Back to index

glibc  2.9
Defines | Functions | Variables
dl-machine.h File Reference
#include <string.h>
#include <sys/param.h>
#include <ldsodefs.h>
#include <sysdep.h>

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "sparc64"
#define VALIDX(tag)
#define ELF64_R_TYPE_ID(info)   ((info) & 0xff)
#define ELF64_R_TYPE_DATA(info)   ((info) >> 8)
#define LOAD_PIC_REG(PIC_REG)
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_SPARC_JMP_SLOT
#define ELF_MACHINE_NO_REL   1
#define ELF_MACHINE_PLTREL_OVERLAP   1
#define elf_machine_relplt   elf_machine_rela
#define DL_STACK_END(cookie)   ((void *) (((long) (cookie)) - (22 - 6) * 8 - STACK_BIAS))
#define __S1(x)   #x
#define __S(x)   __S1(x)
#define RTLD_START
#define ARCH_LA_PLTENTER   sparc64_gnu_pltenter
#define ARCH_LA_PLTEXIT   sparc64_gnu_pltexit

Functions

static int elf_machine_matches_host (const Elf64_Ehdr *ehdr)
static Elf64_Addr elf_machine_dynamic (void)
static Elf64_Addr elf_machine_load_address (void)
static void __attribute__ ((always_inline)) sparc64_fixup_plt(struct link_map *map

Variables

static void const Elf64_Relareloc
static void const Elf64_Rela
Elf64_Addr
reloc_addr
static void const Elf64_Rela
Elf64_Addr Elf64_Addr 
value
static void const Elf64_Rela
Elf64_Addr Elf64_Addr
Elf64_Addr 
high

Define Documentation

#define __S (   x)    __S1(x)
#define __S1 (   x)    #x
#define ARCH_LA_PLTENTER   sparc64_gnu_pltenter
#define ARCH_LA_PLTEXIT   sparc64_gnu_pltexit
#define DL_STACK_END (   cookie)    ((void *) (((long) (cookie)) - (22 - 6) * 8 - STACK_BIAS))
#define ELF64_R_TYPE_DATA (   info)    ((info) >> 8)

Definition at line 37 of file dl-machine.h.

#define ELF64_R_TYPE_ID (   info)    ((info) & 0xff)

Definition at line 36 of file dl-machine.h.

#define ELF_MACHINE_NAME   "sparc64"

Definition at line 24 of file dl-machine.h.

#define ELF_MACHINE_NO_REL   1
#define elf_machine_relplt   elf_machine_rela
#define LOAD_PIC_REG (   PIC_REG)
Value:
do {   Elf64_Addr tmp;             \
       __asm("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t" \
             "rd %%pc, %0\n\t" \
             "add %1, %%lo(_GLOBAL_OFFSET_TABLE_+4), %1\n\t" \
             "add %0, %1, %0" \
             : "=r" (PIC_REG), "=r" (tmp)); \
} while (0)

Definition at line 49 of file dl-machine.h.

#define RTLD_START
#define VALIDX (   tag)
Value:

Definition at line 32 of file dl-machine.h.


Function Documentation

static void __attribute__ ( (always_inline)  ) [inline, static]
static Elf64_Addr elf_machine_dynamic ( void  ) [inline, static]

Definition at line 62 of file dl-machine.h.

{
  register Elf64_Addr *elf_pic_register __asm__("%l7");

  LOAD_PIC_REG (elf_pic_register);

  return *elf_pic_register;
}

Here is the call graph for this function:

static Elf64_Addr elf_machine_load_address ( void  ) [inline, static]

Definition at line 73 of file dl-machine.h.

{
  register Elf32_Addr *pc __asm ("%o7");
  register Elf64_Addr *got __asm ("%l7");

  __asm ("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t"
         "call 1f\n\t"
         " add %1, %%lo(_GLOBAL_OFFSET_TABLE_+4), %1\n\t"
         "call _DYNAMIC\n\t"
         "call _GLOBAL_OFFSET_TABLE_\n"
         "1:\tadd %1, %0, %1\n\t" : "=r" (pc), "=r" (got));

  /* got is now l_addr + _GLOBAL_OFFSET_TABLE_
     *got is _DYNAMIC
     pc[2]*4 is l_addr + _DYNAMIC - (long)pc - 8
     pc[3]*4 is l_addr + _GLOBAL_OFFSET_TABLE_ - (long)pc - 12  */
  return (Elf64_Addr) got - *got + (Elf32_Sword) ((pc[2] - pc[3]) * 4) - 4;
}
static int elf_machine_matches_host ( const Elf64_Ehdr ehdr) [inline, static]

Definition at line 41 of file dl-machine.h.

{
  return ehdr->e_machine == EM_SPARCV9;
}

Variable Documentation

Definition at line 95 of file dl-machine.h.

Definition at line 95 of file dl-machine.h.

Definition at line 95 of file dl-machine.h.

Definition at line 95 of file dl-machine.h.