Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  *  * Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  *  * Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in
     12  *    the documentation and/or other materials provided with the
     13  *    distribution.
     14  *
     15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     18  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     19  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     22  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     25  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  * SUCH DAMAGE.
     27  */
     28 
     29 .section .init_array, "aw"
     30 .align 4
     31 .type __INIT_ARRAY__, @object
     32 .globl __INIT_ARRAY__
     33 __INIT_ARRAY__:
     34     .long -1
     35     .long frame_dummy
     36 
     37 .section .fini_array, "aw"
     38 .align 4
     39 .type __FINI_ARRAY__, @object
     40 .globl __FINI_ARRAY__
     41 __FINI_ARRAY__:
     42     .long -1
     43     .long __do_global_dtors_aux
     44 
     45 	.section	.eh_frame,"a",@progbits
     46 	.align 4
     47 	.type	__EH_FRAME_BEGIN__, @object
     48 __EH_FRAME_BEGIN__:
     49 	.text
     50 	.p2align 4,,15
     51 	.type	__do_global_dtors_aux, @function
     52 __do_global_dtors_aux:
     53 	pushl	%ebp
     54 	movl	%esp, %ebp
     55 	pushl	%ebx
     56 	call	__x86.get_pc_thunk.bx
     57 	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
     58 	subl	$20, %esp
     59 	cmpb	$0, completed.4454@GOTOFF(%ebx)
     60 	jne	.L5
     61 	movl	__dso_handle@GOTOFF(%ebx), %eax
     62 	movl	%eax, (%esp)
     63 	call	__cxa_finalize@PLT
     64 	movl	__deregister_frame_info_bases@GOT(%ebx), %eax
     65 	testl	%eax, %eax
     66 	je	.L4
     67 	leal	__EH_FRAME_BEGIN__@GOTOFF(%ebx), %eax
     68 	movl	%eax, (%esp)
     69 	call	__deregister_frame_info_bases@PLT
     70 .L4:
     71 	movb	$1, completed.4454@GOTOFF(%ebx)
     72 .L5:
     73 	addl	$20, %esp
     74 	popl	%ebx
     75 	popl	%ebp
     76 	ret
     77 	.text
     78 	.p2align 4,,15
     79 	.type	frame_dummy, @function
     80 frame_dummy:
     81 	pushl	%ebp
     82 	movl	%esp, %ebp
     83 	pushl	%ebx
     84 	call	__x86.get_pc_thunk.bx
     85 	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
     86 	subl	$20, %esp
     87 	movl	__register_frame_info_bases@GOT(%ebx), %eax
     88 	testl	%eax, %eax
     89 	je	.L8
     90 	leal	object.4469@GOTOFF(%ebx), %eax
     91 	movl	%eax, 4(%esp)
     92 	leal	__EH_FRAME_BEGIN__@GOTOFF(%ebx), %eax
     93 	movl	%ebx, 12(%esp)
     94 	movl	$0, 8(%esp)
     95 	movl	%eax, (%esp)
     96 	call	__register_frame_info_bases@PLT
     97 .L8:
     98 	addl	$20, %esp
     99 	popl	%ebx
    100 	popl	%ebp
    101 	ret
    102 	.local	completed.4454
    103 	.comm	completed.4454,1,1
    104 	.local	object.4469
    105 	.comm	object.4469,24,4
    106 	.weak	__register_frame_info_bases
    107 	.weak	__deregister_frame_info_bases
    108 
    109 #include "__dso_handle_so.S"
    110 #include "atexit.S"
    111 #include "__stack_chk_fail_local.S"
    112