Back to index

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

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "SH"
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS   int plt_type
#define ELF_MACHINE_USER_ADDRESS_MASK   0x80000000UL
#define RTLD_START   asm ("\.text\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ mov r15,r4\n\ mov.l .L_dl_start,r1\n\ mova .L_dl_start,r0\n\ add r1,r0\n\ jsr @r0\n\ nop\n\_dl_start_user:\n\ ! Save the user entry point address in r8.\n\ mov r0,r8\n\ ! Point r12 at the GOT.\n\ mov.l 1f,r12\n\ mova 1f,r0\n\ bra 2f\n\ add r0,r12\n\ .align 2\n\1: .long _GLOBAL_OFFSET_TABLE_\n\2: ! See if we were run as a command with the executable file\n\ ! name as an extra leading argument.\n\ mov.l .L_dl_skip_args,r0\n\ mov.l @(r0,r12),r0\n\ mov.l @r0,r0\n\ ! Get the original argument count.\n\ mov.l @r15,r5\n\ ! Subtract _dl_skip_args from it.\n\ sub r0,r5\n\ ! Adjust the stack pointer to skip _dl_skip_args words.\n\ shll2 r0\n\ add r0,r15\n\ ! Store back the modified argument count.\n\ mov.l r5,@r15\n\ ! Compute argv address and envp.\n\ mov r15,r6\n\ add #4,r6\n\ mov r5,r7\n\ shll2 r7\n\ add r15,r7\n\ add #8,r7\n\ mov.l .L_dl_loaded,r0\n\ mov.l @(r0,r12),r0\n\ mov.l @r0,r4\n\ ! Call _dl_init.\n\ mov.l .L_dl_init,r1\n\ mova .L_dl_init,r0\n\ add r1,r0\n\ jsr @r0\n\ nop\n\1: ! Pass our finalizer function to the user in r4, as per ELF ABI.\n\ mov.l .L_dl_fini,r0\n\ mov.l @(r0,r12),r4\n\ ! Jump to the user's entry point.\n\ jmp @r8\n\ nop\n\ .align 2\n\.L_dl_start:\n\ .long _dl_start@PLT\n\.L_dl_skip_args:\n\ .long _dl_skip_args@GOT\n\.L_dl_init:\n\ .long _dl_init_internal@PLT\n\.L_dl_loaded:\n\ .long _rtld_local@GOT\n\.L_dl_fini:\n\ .long _dl_fini@GOT\n\ .type __fpscr_values,@object\n\ .global __fpscr_values\n\__fpscr_values:\n\ .long 0\n\ .long 0x80000\n\ .weak __fpscr_values\n\.previous\n\");
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_SH_JMP_SLOT
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ARCH_LA_PLTENTER   sh_gnu_pltenter
#define ARCH_LA_PLTEXIT   sh_gnu_pltexit
#define ELF_MACHINE_NO_REL   1

Functions

static int __attribute__ ((unused)) elf_machine_matches_host(const Elf32_Ehdr *ehdr)
static int __attribute__ ((unused, always_inline)) elf_machine_runtime_setup(struct link_map *l

Variables

static int int lazy

Define Documentation

#define ARCH_LA_PLTENTER   sh_gnu_pltenter
#define ARCH_LA_PLTEXIT   sh_gnu_pltexit
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ELF_MACHINE_NAME   "SH"

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

#define ELF_MACHINE_NO_REL   1
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS   int plt_type
#define ELF_MACHINE_USER_ADDRESS_MASK   0x80000000UL
#define RTLD_START   asm ("\.text\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ mov r15,r4\n\ mov.l .L_dl_start,r1\n\ mova .L_dl_start,r0\n\ add r1,r0\n\ jsr @r0\n\ nop\n\_dl_start_user:\n\ ! Save the user entry point address in r8.\n\ mov r0,r8\n\ ! Point r12 at the GOT.\n\ mov.l 1f,r12\n\ mova 1f,r0\n\ bra 2f\n\ add r0,r12\n\ .align 2\n\1: .long _GLOBAL_OFFSET_TABLE_\n\2: ! See if we were run as a command with the executable file\n\ ! name as an extra leading argument.\n\ mov.l .L_dl_skip_args,r0\n\ mov.l @(r0,r12),r0\n\ mov.l @r0,r0\n\ ! Get the original argument count.\n\ mov.l @r15,r5\n\ ! Subtract _dl_skip_args from it.\n\ sub r0,r5\n\ ! Adjust the stack pointer to skip _dl_skip_args words.\n\ shll2 r0\n\ add r0,r15\n\ ! Store back the modified argument count.\n\ mov.l r5,@r15\n\ ! Compute argv address and envp.\n\ mov r15,r6\n\ add #4,r6\n\ mov r5,r7\n\ shll2 r7\n\ add r15,r7\n\ add #8,r7\n\ mov.l .L_dl_loaded,r0\n\ mov.l @(r0,r12),r0\n\ mov.l @r0,r4\n\ ! Call _dl_init.\n\ mov.l .L_dl_init,r1\n\ mova .L_dl_init,r0\n\ add r1,r0\n\ jsr @r0\n\ nop\n\1: ! Pass our finalizer function to the user in r4, as per ELF ABI.\n\ mov.l .L_dl_fini,r0\n\ mov.l @(r0,r12),r4\n\ ! Jump to the user's entry point.\n\ jmp @r8\n\ nop\n\ .align 2\n\.L_dl_start:\n\ .long _dl_start@PLT\n\.L_dl_skip_args:\n\ .long _dl_skip_args@GOT\n\.L_dl_init:\n\ .long _dl_init_internal@PLT\n\.L_dl_loaded:\n\ .long _rtld_local@GOT\n\.L_dl_fini:\n\ .long _dl_fini@GOT\n\ .type __fpscr_values,@object\n\ .global __fpscr_values\n\__fpscr_values:\n\ .long 0\n\ .long 0x80000\n\ .weak __fpscr_values\n\.previous\n\");

Function Documentation

static int __attribute__ ( (unused)  ) const [inline, static]

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

{
  return ehdr->e_machine == EM_SH;
}
static int __attribute__ ( (unused, always_inline)  ) [inline, static]

Variable Documentation

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