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>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ELF_MACHINE_NAME   "x86_64"
#define RTLD_START   asm ("\n\.text\n\ .align 16\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ movq %rsp, %rdi\n\ call _dl_start\n\_dl_start_user:\n\ # Save the user entry point address in %r12.\n\ movq %rax, %r12\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(%rip), %eax\n\ # Pop the original argument count.\n\ popq %rdx\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ leaq (%rsp,%rax,8), %rsp\n\ # Subtract _dl_skip_args from argc.\n\ subl %eax, %edx\n\ # Push argc back on the stack.\n\ pushq %rdx\n\ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ # argc -> rsi\n\ movq %rdx, %rsi\n\ # Save %rsp value in %r13.\n\ movq %rsp, %r13\n\ # And align stack for the _dl_init_internal call. \n\ andq $-16, %rsp\n\ # _dl_loaded -> rdi\n\ movq _rtld_local(%rip), %rdi\n\ # env -> rcx\n\ leaq 16(%r13,%rdx,8), %rcx\n\ # argv -> rdx\n\ leaq 8(%r13), %rdx\n\ # Clear %rbp to mark outermost frame obviously even for constructors.\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 %rdx, as per ELF ABI.\n\ leaq _dl_fini(%rip), %rdx\n\ # And make sure %rsp points to argc stored on the stack.\n\ movq %r13, %rsp\n\ # Jump to the user's entry point.\n\ jmp *%r12\n\.previous\n\");
#define elf_machine_type_class(type)
#define ELF_MACHINE_JMP_SLOT   R_X86_64_JUMP_SLOT
#define ELF_MACHINE_NO_REL   1
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ARCH_LA_PLTENTER   x86_64_gnu_pltenter
#define ARCH_LA_PLTEXIT   x86_64_gnu_pltexit

Functions

static int __attribute__ ((unused)) elf_machine_matches_host(const Elf64_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   x86_64_gnu_pltenter
#define ARCH_LA_PLTEXIT   x86_64_gnu_pltexit
#define DL_PLATFORM_INIT   dl_platform_init ()
#define ELF_MACHINE_NAME   "x86_64"

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

#define ELF_MACHINE_NO_REL   1
#define RTLD_START   asm ("\n\.text\n\ .align 16\n\.globl _start\n\.globl _dl_start_user\n\_start:\n\ movq %rsp, %rdi\n\ call _dl_start\n\_dl_start_user:\n\ # Save the user entry point address in %r12.\n\ movq %rax, %r12\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(%rip), %eax\n\ # Pop the original argument count.\n\ popq %rdx\n\ # Adjust the stack pointer to skip _dl_skip_args words.\n\ leaq (%rsp,%rax,8), %rsp\n\ # Subtract _dl_skip_args from argc.\n\ subl %eax, %edx\n\ # Push argc back on the stack.\n\ pushq %rdx\n\ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ # argc -> rsi\n\ movq %rdx, %rsi\n\ # Save %rsp value in %r13.\n\ movq %rsp, %r13\n\ # And align stack for the _dl_init_internal call. \n\ andq $-16, %rsp\n\ # _dl_loaded -> rdi\n\ movq _rtld_local(%rip), %rdi\n\ # env -> rcx\n\ leaq 16(%r13,%rdx,8), %rcx\n\ # argv -> rdx\n\ leaq 8(%r13), %rdx\n\ # Clear %rbp to mark outermost frame obviously even for constructors.\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 %rdx, as per ELF ABI.\n\ leaq _dl_fini(%rip), %rdx\n\ # And make sure %rsp points to argc stored on the stack.\n\ movq %r13, %rsp\n\ # Jump to the user's entry point.\n\ jmp *%r12\n\.previous\n\");

Function Documentation

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

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

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

Variable Documentation

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