diff options
author | Bruce Beare <bruce.j.beare@intel.com> | 2011-01-27 10:23:16 -0800 |
---|---|---|
committer | Bruce Beare <bruce.j.beare@intel.com> | 2011-02-16 17:50:23 -0800 |
commit | 48e1feaa9d7d7f36b5eba25baccd99a56adf9b64 (patch) | |
tree | cebfb3b8bbea895cf8f56246b8c60839cd8c50db /libc/arch-x86 | |
parent | 69d6c2ccd943f43e87445d00e96eb98deb690ea1 (diff) | |
download | bionic-48e1feaa9d7d7f36b5eba25baccd99a56adf9b64.zip bionic-48e1feaa9d7d7f36b5eba25baccd99a56adf9b64.tar.gz bionic-48e1feaa9d7d7f36b5eba25baccd99a56adf9b64.tar.bz2 |
Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
Change-Id: Ia840a19a45257128eccdcf25d105f500f2d90741
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Diffstat (limited to 'libc/arch-x86')
-rw-r--r-- | libc/arch-x86/bionic/crtbegin_dynamic.S | 14 | ||||
-rw-r--r-- | libc/arch-x86/bionic/crtbegin_so.S | 16 | ||||
-rw-r--r-- | libc/arch-x86/bionic/crtbegin_static.S | 6 | ||||
-rw-r--r-- | libc/arch-x86/bionic/crtend.S | 5 | ||||
-rw-r--r-- | libc/arch-x86/bionic/crtend_so.S | 41 |
5 files changed, 1 insertions, 81 deletions
diff --git a/libc/arch-x86/bionic/crtbegin_dynamic.S b/libc/arch-x86/bionic/crtbegin_dynamic.S index 88e7e6a..0a7bc62 100644 --- a/libc/arch-x86/bionic/crtbegin_dynamic.S +++ b/libc/arch-x86/bionic/crtbegin_dynamic.S @@ -66,14 +66,7 @@ _start: 1: .long __PREINIT_ARRAY__ .long __INIT_ARRAY__ .long __FINI_ARRAY__ - .long __CTOR_LIST__ - -# the .ctors section contains a list of pointers to "constructor" -# functions that need to be called in order during C library initialization, -# just before the program is being run. This is a C++ requirement -# -# the last entry shall be 0, and is defined in crtend.S -# + .section .preinit_array, "aw" .globl __PREINIT_ARRAY__ __PREINIT_ARRAY__: @@ -89,9 +82,4 @@ __INIT_ARRAY__: __FINI_ARRAY__: .long -1 - .section .ctors, "aw" - .globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 - #include "__dso_handle.S" diff --git a/libc/arch-x86/bionic/crtbegin_so.S b/libc/arch-x86/bionic/crtbegin_so.S index d879fef..b3a01b5 100644 --- a/libc/arch-x86/bionic/crtbegin_so.S +++ b/libc/arch-x86/bionic/crtbegin_so.S @@ -5,15 +5,6 @@ _on_dlclose: call __cxa_finalize ret -/* we put the _init() function here in case the user files for the shared - * libs want to drop things into .init section. - * We then will call our ctors from crtend_so.o */ -.section .init -.align 4 -.type _init, @function -.globl _init -_init: - .section .init_array, "aw" .align 4 .type __INIT_ARRAY__, @object @@ -29,11 +20,4 @@ __FINI_ARRAY__: .long -1 .long _on_dlclose -.section .ctors, "aw" -.align 4 -.type __CTOR_LIST__, @object -.globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 - #include "__dso_handle.S" diff --git a/libc/arch-x86/bionic/crtbegin_static.S b/libc/arch-x86/bionic/crtbegin_static.S index 3f8446e..d5c2430 100644 --- a/libc/arch-x86/bionic/crtbegin_static.S +++ b/libc/arch-x86/bionic/crtbegin_static.S @@ -65,7 +65,6 @@ _start: 1: .long __PREINIT_ARRAY__ .long __INIT_ARRAY__ .long __FINI_ARRAY__ - .long __CTOR_LIST__ .section .preinit_array, "aw" .globl __PREINIT_ARRAY__ @@ -82,9 +81,4 @@ __INIT_ARRAY__: __FINI_ARRAY__: .long -1 - .section .ctors, "aw" - .globl __CTOR_LIST__ -__CTOR_LIST__: - .long -1 - #include "__dso_handle.S" diff --git a/libc/arch-x86/bionic/crtend.S b/libc/arch-x86/bionic/crtend.S index 7f5fb66..884ba8b 100644 --- a/libc/arch-x86/bionic/crtend.S +++ b/libc/arch-x86/bionic/crtend.S @@ -1,4 +1,3 @@ - .section .preinit_array, "aw" .long 0 @@ -7,7 +6,3 @@ .section .fini_array, "aw" .long 0 - - .section .ctors, "aw" - .long 0 - diff --git a/libc/arch-x86/bionic/crtend_so.S b/libc/arch-x86/bionic/crtend_so.S index 7fb2280..8c9d419 100644 --- a/libc/arch-x86/bionic/crtend_so.S +++ b/libc/arch-x86/bionic/crtend_so.S @@ -1,44 +1,3 @@ -.text -.align 4 -.type __bionic_call_ctors, @function - -/* - * The CTORS_LIST is marked by -1 (start) and 0 (end). - * We mark the end of the .ctors section with the __CTOR_END__ section so - * that we can just iterate backwards from it until we hit -1 and execute - * all the function pointers. This seems to be the way to do it for SVR4 - * derived systems. - */ -__bionic_call_ctors: - pushl %esi - mov $__CTOR_END__, %esi - -0: - /* now grab the next function pointer and check if its -1. If not, - * call it, otherwise we're done. We use %esi since it's callee saved. - */ - subl $4, %esi - mov (%esi), %eax - cmp $0xffffffff, %eax - je 1f - call *%eax - jmp 0b - -1: - /* we're done */ - popl %esi - ret - -.section .init -.align 4 - call __bionic_call_ctors - ret - -.section .ctors, "aw", @progbits -.align 4 -.type __CTOR_END__, @object -__CTOR_END__: - .long 0 .section .init_array, "aw" .long 0 |