1 /* Initialization code run first thing by the ELF startup code.
3 Copyright (C) 1995 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the GNU C Library; see the file COPYING.LIB. If
18 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
25 /* Called from start.S. Not: there is no value in %ebx. */
27 ENTRY (__libc_init_first)
29 /* Make sure we are not using iBSC2 personality. */
30 movl $SYS_ify (personality), %eax
35 /* Set control work of FPU. */
38 addl $_GLOBAL_OFFSET_TABLE_+[.-.L0], %ebx
39 movzwl C_SYMBOL_NAME(___fpu_control@GOT)(%ebx), %eax
41 movzwl ___fpu_control, %eax
44 call JUMPTARGET(__setfpucw)
47 /* That is all for now. */
51 /* This is only a dummy function for the list below. */
52 .type _dummy_exit, @function
57 .section .init,"ax",@progbits
58 movl 16(%ebp), %edx /* envp */
59 movl 12(%ebp), %ecx /* argv */
60 movl 8(%ebp), %eax /* argc */
65 call JUMPTARGET(__libc_init)
70 /* Make sure __libc_subinit section is always present. */
71 .section __libc_subinit, "a", @progbits
73 .type __elf_set___libc_subinit_element__dummy_exit__, @object
74 .size __elf_set___libc_subinit_element__dummy_exit__, 4
75 __elf_set___libc_subinit_element__dummy_exit__:
78 /* Make sure __libc_atexit section is always present. */
79 .section __libc_atexit, "a", @progbits
81 .type __elf_set___libc_atexit_element__dummy_exit__, @object
82 .size __elf_set___libc_atexit_element__dummy_exit__, 4
83 __elf_set___libc_atexit_element__dummy_exit__: