diff options
author | Steve Kondik <shade@chemlab.org> | 2011-09-29 16:26:00 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2011-09-29 16:26:00 -0700 |
commit | 40d5df28bc4278d543697c960267ba3b5da74163 (patch) | |
tree | 4a1cae5501cb263d8b2fbd821ff0434bc7732809 /libc/arch-x86/bionic/atexit.S | |
parent | 6ed844f1f2e3a53939b606011a76fb3e353a7a92 (diff) | |
parent | 50a83255d80f98b857c3f72dd2225d4bbc720ca3 (diff) | |
download | android_bionic-gingerbread-release.tar.gz android_bionic-gingerbread-release.tar.bz2 android_bionic-gingerbread-release.zip |
Merge branch 'gingerbread' of git://git.omapzoom.org/platform/bionic into 237cm-7.1.0gingerbread-release
Conflicts:
libc/Android.mk
libthread_db/Android.mk
Change-Id: I4a730f70bf3b31331ab9cee5f1a098d4162ef4b7
Diffstat (limited to 'libc/arch-x86/bionic/atexit.S')
-rw-r--r-- | libc/arch-x86/bionic/atexit.S | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/libc/arch-x86/bionic/atexit.S b/libc/arch-x86/bionic/atexit.S new file mode 100644 index 000000000..b28f40bb6 --- /dev/null +++ b/libc/arch-x86/bionic/atexit.S @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + .text + .p2align 4,,15 + .globl atexit + .hidden atexit + .type atexit, @function +atexit: + pushl %ebp + movl %esp, %ebp + pushl %ebx + call __x86.get_pc_thunk.bx + addl $_GLOBAL_OFFSET_TABLE_, %ebx + subl $20, %esp + movl $0, 4(%esp) + movl __dso_handle@GOTOFF(%ebx), %eax + movl %eax, 8(%esp) + movl 8(%ebp), %eax + movl %eax, (%esp) + call __cxa_atexit@PLT + addl $20, %esp + popl %ebx + popl %ebp + ret + .size atexit, .-atexit + + .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat + .globl __x86.get_pc_thunk.bx + .hidden __x86.get_pc_thunk.bx + .type __x86.get_pc_thunk.bx, @function +__x86.get_pc_thunk.bx: + nop + nop + nop + nop + nop + nop + nop + nop + movl (%esp), %ebx + ret |