Back to index

glibc  2.9
Classes | Defines | Functions | Variables
dl-machine.h File Reference
#include <assert.h>
#include <sys/param.h>
#include <dl-tls.h>
#include <sysdep.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Elf64_FuncDesc

Defines

#define ELF_MACHINE_NAME   "powerpc64"
#define DT_PPC64(x)   (DT_PPC64_##x - DT_LOPROC + DT_NUM)
#define ELF_MULT_MACHINES_SUPPORTED
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info)   /* nothing */
#define elf_machine_relplt   elf_machine_rela
#define DL_STARTING_UP_DEF
#define RTLD_START
#define elf_machine_type_class(type)   (ELF_RTYPE_CLASS_PLT | (((type) == R_PPC64_COPY) * ELF_RTYPE_CLASS_COPY))
#define ELF_MACHINE_JMP_SLOT   R_PPC64_JMP_SLOT
#define ELF_MACHINE_NO_REL   1
#define PLT_INITIAL_ENTRY_WORDS   3
#define GLINK_INITIAL_ENTRY_WORDS   8
#define PPC_DCBST(where)   asm volatile ("dcbst 0,%0" : : "r"(where) : "memory")
#define PPC_DCBT(where)   asm volatile ("dcbt 0,%0" : : "r"(where) : "memory")
#define PPC_DCBF(where)   asm volatile ("dcbf 0,%0" : : "r"(where) : "memory")
#define PPC_SYNC   asm volatile ("sync" : : : "memory")
#define PPC_ISYNC   asm volatile ("sync; isync" : : : "memory")
#define PPC_ICBI(where)   asm volatile ("icbi 0,%0" : : "r"(where) : "memory")
#define PPC_DIE   asm volatile ("tweq 0,0")
#define MODIFIED_CODE_NOQUEUE(where)   do { PPC_DCBST(where); PPC_SYNC; PPC_ICBI(where); } while (0)
#define MODIFIED_CODE(where)   do { PPC_DCBST(where); PPC_SYNC; PPC_ICBI(where); PPC_ISYNC; } while (0)
#define ARCH_LA_PLTENTER   ppc64_gnu_pltenter
#define ARCH_LA_PLTEXIT   ppc64_gnu_pltexit

Functions

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

Variables

static int int lazy

Class Documentation

struct Elf64_FuncDesc

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

Class Members
Elf64_Addr fd_aux
Elf64_Addr fd_func
Elf64_Addr fd_toc

Define Documentation

#define ARCH_LA_PLTENTER   ppc64_gnu_pltenter
#define ARCH_LA_PLTEXIT   ppc64_gnu_pltexit
Value:
".LC__dl_starting_up:\n"  \
"      .tc _dl_starting_up_internal[TC],_dl_starting_up_internal\n"

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

#define DT_PPC64 (   x)    (DT_PPC64_##x - DT_LOPROC + DT_NUM)

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

#define ELF_MACHINE_BEFORE_RTLD_RELOC (   dynamic_info)    /* nothing */

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

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

#define ELF_MACHINE_NAME   "powerpc64"

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

#define ELF_MACHINE_NO_REL   1

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

#define elf_machine_relplt   elf_machine_rela

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

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

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

#define GLINK_INITIAL_ENTRY_WORDS   8

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

#define MODIFIED_CODE (   where)    do { PPC_DCBST(where); PPC_SYNC; PPC_ICBI(where); PPC_ISYNC; } while (0)

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

#define MODIFIED_CODE_NOQUEUE (   where)    do { PPC_DCBST(where); PPC_SYNC; PPC_ICBI(where); } while (0)

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

#define PLT_INITIAL_ENTRY_WORDS   3

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

#define PPC_DCBF (   where)    asm volatile ("dcbf 0,%0" : : "r"(where) : "memory")

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

#define PPC_DCBST (   where)    asm volatile ("dcbst 0,%0" : : "r"(where) : "memory")

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

#define PPC_DCBT (   where)    asm volatile ("dcbt 0,%0" : : "r"(where) : "memory")

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

#define PPC_DIE   asm volatile ("tweq 0,0")

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

#define PPC_ICBI (   where)    asm volatile ("icbi 0,%0" : : "r"(where) : "memory")

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

#define PPC_ISYNC   asm volatile ("sync; isync" : : : "memory")

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

#define PPC_SYNC   asm volatile ("sync" : : : "memory")

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

#define RTLD_START

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


Function Documentation

static int __attribute__ ( (always_inline)  ) [inline, static]
static int elf_host_tolerates_class ( const Elf64_Ehdr ehdr) [inline, static]

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

{
  return ehdr->e_ident[EI_CLASS] == ELFCLASS32;
}
static int elf_host_tolerates_machine ( const Elf64_Ehdr ehdr) [inline, static]

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

{
  return ehdr->e_machine == EM_PPC;
}
static Elf64_Addr elf_machine_dynamic ( void  ) [inline, static]

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

{
  Elf64_Addr runtime_dynamic;
  /* It's easier to get the run-time address.  */
  asm (       "      addis  %0,2,_DYNAMIC@toc@ha\n"
       "      addi   %0,%0,_DYNAMIC@toc@l\n"
       : "=b" (runtime_dynamic));
  /* Then subtract off the load address offset.  */
  return runtime_dynamic - elf_machine_load_address() ;
}

Here is the call graph for this function:

static Elf64_Addr elf_machine_load_address ( void  ) const [inline, static]

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

{
  Elf64_Addr ret;

  /* The first entry in .got (and thus the first entry in .toc) is the
     link-time TOC_base, ie. r2.  So the difference between that and
     the current r2 set by the kernel is how far the shared lib has
     moved.  */
  asm (       "      ld     %0,-32768(2)\n"
       "      subf   %0,%0,2\n"
       : "=r" (ret));
  return ret;
}

Here is the caller graph for this function:

static int elf_machine_matches_host ( const Elf64_Ehdr ehdr) [inline, static]

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

{
  return ehdr->e_machine == EM_PPC64;
}

Variable Documentation

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