Back to index

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

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "ARM"
#define VALID_ELF_ABIVERSION(ver)   (ver == 0)
#define VALID_ELF_OSABI(osabi)   (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
#define VALID_ELF_HEADER(hdr, exp, size)
#define CLEAR_CACHE(BEG, END)   INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
#define BX(x)   "mov\tpc, " #x
#define ELF_MACHINE_USER_ADDRESS_MASK   0xf8000000UL
#define RTLD_START   asm ("\.text\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ @ we are PIC code, so get global offset table\n\ ldr sl, .L_GET_GOT\n\ @ See if we were run as a command with the executable file\n\ @ name as an extra leading argument.\n\ ldr r4, .L_SKIP_ARGS\n\ @ at start time, all the args are on the stack\n\ mov r0, sp\n\ bl _dl_start\n\ @ returns user entry point in r0\n\_dl_start_user:\n\ add sl, pc, sl\n\.L_GOT_GOT:\n\ ldr r4, [sl, r4]\n\ @ save the entry point in another register\n\ mov r6, r0\n\ @ get the original arg count\n\ ldr r1, [sp]\n\ @ get the argv address\n\ add r2, sp, #4\n\ @ Fix up the stack if necessary.\n\ cmp r4, #0\n\ bne .L_fixup_stack\n\.L_done_fixup:\n\ @ compute envp\n\ add r3, r2, r1, lsl #2\n\ add r3, r3, #4\n\ @ now we call _dl_init\n\ ldr r0, .L_LOADED\n\ ldr r0, [sl, r0]\n\ @ call _dl_init\n\ bl _dl_init_internal(PLT)\n\ @ load the finalizer function\n\ ldr r0, .L_FINI_PROC\n\ add r0, sl, r0\n\ @ jump to the user_s entry point\n\ " BX(r6) "\n\\n\ @ iWMMXt and EABI targets require the stack to be eight byte\n\ @ aligned - shuffle arguments etc.\n\.L_fixup_stack:\n\ @ subtract _dl_skip_args from original arg count\n\ sub r1, r1, r4\n\ @ store the new argc in the new stack location\n\ str r1, [sp]\n\ @ find the first unskipped argument\n\ mov r3, r2\n\ add r4, r2, r4, lsl #2\n\ @ shuffle argv down\n\1: ldr r5, [r4], #4\n\ str r5, [r3], #4\n\ cmp r5, #0\n\ bne 1b\n\ @ shuffle envp down\n\1: ldr r5, [r4], #4\n\ str r5, [r3], #4\n\ cmp r5, #0\n\ bne 1b\n\ @ shuffle auxv down\n\1: ldmia r4!, {r0, r5}\n\ stmia r3!, {r0, r5}\n\ cmp r0, #0\n\ bne 1b\n\ @ Update _dl_argv\n\ ldr r3, .L_ARGV\n\ str r2, [sl, r3]\n\ b .L_done_fixup\n\\n\.L_GET_GOT:\n\ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\.L_SKIP_ARGS:\n\ .word _dl_skip_args(GOTOFF)\n\.L_FINI_PROC:\n\ .word _dl_fini(GOTOFF)\n\.L_ARGV:\n\ .word _dl_argv(GOTOFF)\n\.L_LOADED:\n\ .word _rtld_local(GOTOFF)\n\.previous\n\");
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_ARM_JUMP_SLOT
#define ELF_MACHINE_PLT_REL   1
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ELF_MACHINE_NO_RELA   defined RTLD_BOOTSTRAP
#define ARCH_LA_PLTENTER   arm_gnu_pltenter
#define ARCH_LA_PLTEXIT   arm_gnu_pltexit

Functions

static int __attribute__ ((unused)) elf_machine_matches_host(const Elf32_Ehdr *ehdr)

Variables

static int int lazy

Define Documentation

#define ARCH_LA_PLTENTER   arm_gnu_pltenter
#define ARCH_LA_PLTEXIT   arm_gnu_pltexit
#define BX (   x)    "mov\tpc, " #x
#define CLEAR_CACHE (   BEG,
  END 
)    INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)

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

#define DL_PLATFORM_INIT   dl_platform_init ()
#define ELF_MACHINE_NAME   "ARM"

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

#define ELF_MACHINE_PLT_REL   1
#define ELF_MACHINE_USER_ADDRESS_MASK   0xf8000000UL
#define RTLD_START   asm ("\.text\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ @ we are PIC code, so get global offset table\n\ ldr sl, .L_GET_GOT\n\ @ See if we were run as a command with the executable file\n\ @ name as an extra leading argument.\n\ ldr r4, .L_SKIP_ARGS\n\ @ at start time, all the args are on the stack\n\ mov r0, sp\n\ bl _dl_start\n\ @ returns user entry point in r0\n\_dl_start_user:\n\ add sl, pc, sl\n\.L_GOT_GOT:\n\ ldr r4, [sl, r4]\n\ @ save the entry point in another register\n\ mov r6, r0\n\ @ get the original arg count\n\ ldr r1, [sp]\n\ @ get the argv address\n\ add r2, sp, #4\n\ @ Fix up the stack if necessary.\n\ cmp r4, #0\n\ bne .L_fixup_stack\n\.L_done_fixup:\n\ @ compute envp\n\ add r3, r2, r1, lsl #2\n\ add r3, r3, #4\n\ @ now we call _dl_init\n\ ldr r0, .L_LOADED\n\ ldr r0, [sl, r0]\n\ @ call _dl_init\n\ bl _dl_init_internal(PLT)\n\ @ load the finalizer function\n\ ldr r0, .L_FINI_PROC\n\ add r0, sl, r0\n\ @ jump to the user_s entry point\n\ " BX(r6) "\n\\n\ @ iWMMXt and EABI targets require the stack to be eight byte\n\ @ aligned - shuffle arguments etc.\n\.L_fixup_stack:\n\ @ subtract _dl_skip_args from original arg count\n\ sub r1, r1, r4\n\ @ store the new argc in the new stack location\n\ str r1, [sp]\n\ @ find the first unskipped argument\n\ mov r3, r2\n\ add r4, r2, r4, lsl #2\n\ @ shuffle argv down\n\1: ldr r5, [r4], #4\n\ str r5, [r3], #4\n\ cmp r5, #0\n\ bne 1b\n\ @ shuffle envp down\n\1: ldr r5, [r4], #4\n\ str r5, [r3], #4\n\ cmp r5, #0\n\ bne 1b\n\ @ shuffle auxv down\n\1: ldmia r4!, {r0, r5}\n\ stmia r3!, {r0, r5}\n\ cmp r0, #0\n\ bne 1b\n\ @ Update _dl_argv\n\ ldr r3, .L_ARGV\n\ str r2, [sl, r3]\n\ b .L_done_fixup\n\\n\.L_GET_GOT:\n\ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\.L_SKIP_ARGS:\n\ .word _dl_skip_args(GOTOFF)\n\.L_FINI_PROC:\n\ .word _dl_fini(GOTOFF)\n\.L_ARGV:\n\ .word _dl_argv(GOTOFF)\n\.L_LOADED:\n\ .word _rtld_local(GOTOFF)\n\.previous\n\");
#define VALID_ELF_ABIVERSION (   ver)    (ver == 0)

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

#define VALID_ELF_HEADER (   hdr,
  exp,
  size 
)
Value:

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

#define VALID_ELF_OSABI (   osabi)    (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)

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


Function Documentation

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

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

{
  return ehdr->e_machine == EM_ARM;
}

Variable Documentation

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