Back to index

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

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "i386"
#define ELF_MACHINE_USER_ADDRESS_MASK   0xf8000000UL
#define RTLD_START   asm ("\n\ .text\n\ .align 16\n\0: movl (%esp), %ebx\n\ ret\n\ .align 16\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ # Note that _dl_start gets the parameter in %eax.\n\ movl %esp, %eax\n\ call _dl_start\n\_dl_start_user:\n\ # Save the user entry point address in %edi.\n\ movl %eax, %edi\n\ # Point %ebx at the GOT.\n\ call 0b\n\ addl $_GLOBAL_OFFSET_TABLE_, %ebx\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ movl _dl_skip_args@GOTOFF(%ebx), %eax\n\ # Pop the original argument count.\n\ popl %edx\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ leal (%esp,%eax,4), %esp\n\ # Subtract _dl_skip_args from argc.\n\ subl %eax, %edx\n\ # Push argc back on the stack.\n\ push %edx\n\ # The special initializer gets called with the stack just\n\ # as the application's entry point will see it; it can\n\ # switch stacks if it moves these contents over.\n\" RTLD_START_SPECIAL_INIT "\n\ # Load the parameters again.\n\ # (eax, edx, ecx, *--esp) = (_dl_loaded, argc, argv, envp)\n\ movl _rtld_local@GOTOFF(%ebx), %eax\n\ leal 8(%esp,%edx,4), %esi\n\ leal 4(%esp), %ecx\n\ movl %esp, %ebp\n\ # Make sure _dl_init is run with 16 byte aligned stack.\n\ andl $-16, %esp\n\ pushl %eax\n\ pushl %eax\n\ pushl %ebp\n\ pushl %esi\n\ # Clear %ebp, so that even constructors have terminated backchain.\n\ xorl %ebp, %ebp\n\ # Call the function to run the initializers.\n\ call _dl_init_internal@PLT\n\ # Pass our finalizer function to the user in %edx, as per ELF ABI.\n\ leal _dl_fini@GOTOFF(%ebx), %edx\n\ # Restore %esp _start expects.\n\ movl (%esp), %esp\n\ # Jump to the user's entry point.\n\ jmp *%edi\n\ .previous\n\");
#define RTLD_START_SPECIAL_INIT   /* nothing */
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_386_JMP_SLOT
#define ELF_MACHINE_PLT_REL   1
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ARCH_LA_PLTENTER   i86_gnu_pltenter
#define ARCH_LA_PLTEXIT   i86_gnu_pltexit
#define ELF_MACHINE_NO_RELA   defined RTLD_BOOTSTRAP

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   i86_gnu_pltenter
#define ARCH_LA_PLTEXIT   i86_gnu_pltexit
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ELF_MACHINE_NAME   "i386"

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

#define ELF_MACHINE_PLT_REL   1
#define ELF_MACHINE_USER_ADDRESS_MASK   0xf8000000UL
#define RTLD_START   asm ("\n\ .text\n\ .align 16\n\0: movl (%esp), %ebx\n\ ret\n\ .align 16\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ # Note that _dl_start gets the parameter in %eax.\n\ movl %esp, %eax\n\ call _dl_start\n\_dl_start_user:\n\ # Save the user entry point address in %edi.\n\ movl %eax, %edi\n\ # Point %ebx at the GOT.\n\ call 0b\n\ addl $_GLOBAL_OFFSET_TABLE_, %ebx\n\ # See if we were run as a command with the executable file\n\ # name as an extra leading argument.\n\ movl _dl_skip_args@GOTOFF(%ebx), %eax\n\ # Pop the original argument count.\n\ popl %edx\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ leal (%esp,%eax,4), %esp\n\ # Subtract _dl_skip_args from argc.\n\ subl %eax, %edx\n\ # Push argc back on the stack.\n\ push %edx\n\ # The special initializer gets called with the stack just\n\ # as the application's entry point will see it; it can\n\ # switch stacks if it moves these contents over.\n\" RTLD_START_SPECIAL_INIT "\n\ # Load the parameters again.\n\ # (eax, edx, ecx, *--esp) = (_dl_loaded, argc, argv, envp)\n\ movl _rtld_local@GOTOFF(%ebx), %eax\n\ leal 8(%esp,%edx,4), %esi\n\ leal 4(%esp), %ecx\n\ movl %esp, %ebp\n\ # Make sure _dl_init is run with 16 byte aligned stack.\n\ andl $-16, %esp\n\ pushl %eax\n\ pushl %eax\n\ pushl %ebp\n\ pushl %esi\n\ # Clear %ebp, so that even constructors have terminated backchain.\n\ xorl %ebp, %ebp\n\ # Call the function to run the initializers.\n\ call _dl_init_internal@PLT\n\ # Pass our finalizer function to the user in %edx, as per ELF ABI.\n\ leal _dl_fini@GOTOFF(%ebx), %edx\n\ # Restore %esp _start expects.\n\ movl (%esp), %esp\n\ # Jump to the user's entry point.\n\ jmp *%edi\n\ .previous\n\");
#define RTLD_START_SPECIAL_INIT   /* nothing */

Function Documentation

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

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

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

Variable Documentation

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