Back to index

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

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "m68k"
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS   long int save_a0, long int save_a1
#define ELF_MACHINE_USER_ADDRESS_MASK   0x80000000UL
#define RTLD_START   asm ("\ .text\n\ .globl _start\n\ .type _start,@function\n\_start:\n\ move.l %sp, -(%sp)\n\ jbsr _dl_start\n\ addq.l #4, %sp\n\ /* FALLTHRU */\n\\n\ .globl _dl_start_user\n\ .type _dl_start_user,@function\n\_dl_start_user:\n\ | Save the user entry point address in %a4.\n\ move.l %d0, %a4\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ " PCREL_OP ("move.l", "_dl_skip_args", "%d0", "%d0", "%pc") "\n\ | Pop the original argument count\n\ move.l (%sp)+, %d1\n\ | Subtract _dl_skip_args from it.\n\ sub.l %d0, %d1\n\ | Adjust the stack pointer to skip _dl_skip_args words.\n\ lea (%sp, %d0*4), %sp\n\ | Push back the modified argument count.\n\ move.l %d1, -(%sp)\n\ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ pea 8(%sp, %d1*4)\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ " PCREL_OP ("move.l", "_rtld_local", "-(%sp)", "%d0", "%pc") "\n\ jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ | Pass our finalizer function to the user in %a1.\n\ " PCREL_OP ("lea", "_dl_fini", "%a1", "%a1", "%pc") "\n\ | Initialize %fp with the stack pointer.\n\ move.l %sp, %fp\n\ | Jump to the user's entry point.\n\ jmp (%a4)\n\ .size _dl_start_user, . - _dl_start_user\n\ .previous");
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_68K_JMP_SLOT
#define ELF_MACHINE_NO_REL   1
#define ARCH_LA_PLTENTER   m68k_gnu_pltenter
#define ARCH_LA_PLTEXIT   m68k_gnu_pltexit

Functions

static int elf_machine_matches_host (const Elf32_Ehdr *ehdr)
static Elf32_Addr elf_machine_dynamic (void)
static Elf32_Addr elf_machine_load_address (void)
static int __attribute__ ((always_inline)) elf_machine_runtime_setup(struct link_map *l

Variables

static int int lazy

Define Documentation

#define ARCH_LA_PLTENTER   m68k_gnu_pltenter
#define ARCH_LA_PLTEXIT   m68k_gnu_pltexit
#define ELF_MACHINE_NAME   "m68k"

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

#define ELF_MACHINE_NO_REL   1
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS   long int save_a0, long int save_a1
#define ELF_MACHINE_USER_ADDRESS_MASK   0x80000000UL
#define RTLD_START   asm ("\ .text\n\ .globl _start\n\ .type _start,@function\n\_start:\n\ move.l %sp, -(%sp)\n\ jbsr _dl_start\n\ addq.l #4, %sp\n\ /* FALLTHRU */\n\\n\ .globl _dl_start_user\n\ .type _dl_start_user,@function\n\_dl_start_user:\n\ | Save the user entry point address in %a4.\n\ move.l %d0, %a4\n\ | See if we were run as a command with the executable file\n\ | name as an extra leading argument.\n\ " PCREL_OP ("move.l", "_dl_skip_args", "%d0", "%d0", "%pc") "\n\ | Pop the original argument count\n\ move.l (%sp)+, %d1\n\ | Subtract _dl_skip_args from it.\n\ sub.l %d0, %d1\n\ | Adjust the stack pointer to skip _dl_skip_args words.\n\ lea (%sp, %d0*4), %sp\n\ | Push back the modified argument count.\n\ move.l %d1, -(%sp)\n\ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ pea 8(%sp, %d1*4)\n\ pea 8(%sp)\n\ move.l %d1, -(%sp)\n\ " PCREL_OP ("move.l", "_rtld_local", "-(%sp)", "%d0", "%pc") "\n\ jbsr _dl_init_internal@PLTPC\n\ addq.l #8, %sp\n\ addq.l #8, %sp\n\ | Pass our finalizer function to the user in %a1.\n\ " PCREL_OP ("lea", "_dl_fini", "%a1", "%a1", "%pc") "\n\ | Initialize %fp with the stack pointer.\n\ move.l %sp, %fp\n\ | Jump to the user's entry point.\n\ jmp (%a4)\n\ .size _dl_start_user, . - _dl_start_user\n\ .previous");

Function Documentation

static int __attribute__ ( (always_inline)  ) [inline, static]
static Elf32_Addr elf_machine_dynamic ( void  ) [inline, static]

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

{
  Elf32_Addr addr;

  asm ("move.l _DYNAMIC@GOT.w(%%a5), %0"
       : "=a" (addr));
  return addr;
}
static Elf32_Addr elf_machine_load_address ( void  ) [inline, static]

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

{
  Elf32_Addr addr;
  asm (PCREL_OP ("lea", "_dl_start", "%0", "%0", "%%pc") "\n\t"
       "sub.l _dl_start@GOT.w(%%a5), %0"
       : "=a" (addr));
  return addr;
}
static int elf_machine_matches_host ( const Elf32_Ehdr ehdr) [inline, static]

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

{
  return ehdr->e_machine == EM_68K;
}

Variable Documentation

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