Merge changes from topic "libc++abi"
* changes: Add libdl.a from prebuilts/ndk. Remove mips static libraries and crt sources.
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
extern int main(int argc, char** argv, char** env);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void (**preinit_array)(void);
|
||||
void (**init_array)(void);
|
||||
void (**fini_array)(void);
|
||||
void (**ctor_list)(void);
|
||||
void (**dtor_list)(void);
|
||||
} structors_array_t;
|
||||
|
||||
__attribute__ ((section (".preinit_array")))
|
||||
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".init_array")))
|
||||
void (*__INIT_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".fini_array")))
|
||||
void (*__FINI_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".ctors")))
|
||||
void (*__CTOR_LIST__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".dtors")))
|
||||
void (*__DTOR_LIST__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__LIBC_HIDDEN__ void do_mips_start(void *raw_args) {
|
||||
structors_array_t array;
|
||||
array.preinit_array = &__PREINIT_ARRAY__;
|
||||
array.init_array = &__INIT_ARRAY__;
|
||||
array.fini_array = &__FINI_ARRAY__;
|
||||
array.ctor_list = &__CTOR_LIST__;
|
||||
array.dtor_list = &__DTOR_LIST__;
|
||||
|
||||
__libc_init(raw_args, NULL, &main, &array);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function prepares the return address with a branch-and-link
|
||||
* instruction (bal) and then uses a .cpload to compute the Global
|
||||
* Offset Table (GOT) pointer ($gp). The $gp is then used to load
|
||||
* the address of _do_start() into $t9 just before calling it.
|
||||
* Terminating the stack with a NULL return address.
|
||||
*/
|
||||
__asm__ (
|
||||
" .set push \n"
|
||||
" \n"
|
||||
" .text \n"
|
||||
" .align 4 \n"
|
||||
" .type __start,@function \n"
|
||||
" .globl __start \n"
|
||||
" .globl _start \n"
|
||||
" \n"
|
||||
" .ent __start \n"
|
||||
"__start: \n"
|
||||
" _start: \n"
|
||||
" .frame $sp,32,$ra \n"
|
||||
" .mask 0x80000000,-4 \n"
|
||||
" \n"
|
||||
" .set noreorder \n"
|
||||
" bal 1f \n"
|
||||
" nop \n"
|
||||
"1: \n"
|
||||
" .cpload $ra \n"
|
||||
" .set reorder \n"
|
||||
" \n"
|
||||
" move $a0, $sp \n"
|
||||
" addiu $sp, $sp, (-32) \n"
|
||||
" sw $0, 28($sp) \n"
|
||||
" la $t9, do_mips_start \n"
|
||||
" jalr $t9 \n"
|
||||
" \n"
|
||||
"2: b 2b \n"
|
||||
" .end __start \n"
|
||||
" \n"
|
||||
" .set pop \n"
|
||||
);
|
||||
|
||||
#include "__dso_handle.h"
|
||||
#include "atexit.h"
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
extern void __cxa_finalize(void *);
|
||||
extern void *__dso_handle;
|
||||
|
||||
__attribute__((visibility("hidden"),destructor))
|
||||
void __on_dlclose() {
|
||||
__cxa_finalize(&__dso_handle);
|
||||
}
|
||||
|
||||
#include "__dso_handle_so.h"
|
||||
#include "atexit.h"
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
.section .preinit_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .init_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .fini_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .ctors, "aw"
|
||||
.type __CTOR_END__, @object
|
||||
__CTOR_END__:
|
||||
.long 0
|
||||
|
||||
.section .dtors, "aw"
|
||||
.type __DTOR_END__, @object
|
||||
__DTOR_END__:
|
||||
.long 0
|
||||
|
||||
.section .eh_frame,"a",@progbits
|
||||
.align 4
|
||||
.type __FRAME_END__, @object
|
||||
.size __FRAME_END__, 4
|
||||
__FRAME_END__:
|
||||
.zero 4
|
||||
@@ -1,5 +0,0 @@
|
||||
.section .init_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .fini_array, "aw"
|
||||
.long 0
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#ifdef __LP64__
|
||||
# define ASM_PTR_SIZE(x) .quad x
|
||||
# define ASM_ALIGN_TO_PTR_SIZE .balign 8
|
||||
#else
|
||||
# define ASM_PTR_SIZE(x) .long x
|
||||
# define ASM_ALIGN_TO_PTR_SIZE .balign 4
|
||||
#endif
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern void* __dso_handle;
|
||||
|
||||
extern int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
void __atexit_handler_wrapper(void* func) {
|
||||
if (func != NULL) {
|
||||
(*(void (*)(void))func)();
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__ ((visibility ("hidden")))
|
||||
int atexit(void (*func)(void)) {
|
||||
return (__cxa_atexit(&__atexit_handler_wrapper, func, &__dso_handle));
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#include "../../bionic/libc_init_common.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
__attribute__ ((section (".preinit_array")))
|
||||
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".init_array")))
|
||||
void (*__INIT_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
__attribute__ ((section (".fini_array")))
|
||||
void (*__FINI_ARRAY__)(void) = (void (*)(void)) -1;
|
||||
|
||||
|
||||
__LIBC_HIDDEN__ void do_mips_start(void *raw_args) {
|
||||
structors_array_t array;
|
||||
array.preinit_array = &__PREINIT_ARRAY__;
|
||||
array.init_array = &__INIT_ARRAY__;
|
||||
array.fini_array = &__FINI_ARRAY__;
|
||||
|
||||
__libc_init(raw_args, NULL, &main, &array);
|
||||
}
|
||||
|
||||
#if defined(__LP64__)
|
||||
|
||||
/*
|
||||
* This function prepares the return address with a branch-and-link
|
||||
* instruction (bal) and then uses a .cpsetup to compute the Global
|
||||
* Offset Table (GOT) pointer ($gp). The $gp is then used to load
|
||||
* the address of _do_mips_start() into $t9 just before calling it.
|
||||
* Terminating the stack with a NULL return address.
|
||||
*/
|
||||
__asm__ (
|
||||
" .set push \n"
|
||||
" \n"
|
||||
" .text \n"
|
||||
" .align 4 \n"
|
||||
" .type __start,@function \n"
|
||||
" .globl __start \n"
|
||||
" .globl _start \n"
|
||||
" \n"
|
||||
" .ent __start \n"
|
||||
"__start: \n"
|
||||
" _start: \n"
|
||||
" .frame $sp,32,$0 \n"
|
||||
" .mask 0x80000000,-8 \n"
|
||||
" \n"
|
||||
" move $a0, $sp \n"
|
||||
" daddiu $sp, $sp, -32 \n"
|
||||
" \n"
|
||||
" .set noreorder \n"
|
||||
" bal 1f \n"
|
||||
" nop \n"
|
||||
"1: \n"
|
||||
" .cpsetup $ra,16,1b \n"
|
||||
" .set reorder \n"
|
||||
" \n"
|
||||
" sd $0, 24($sp) \n"
|
||||
" jal do_mips_start \n"
|
||||
" \n"
|
||||
"2: b 2b \n"
|
||||
" .end __start \n"
|
||||
" \n"
|
||||
" .set pop \n"
|
||||
);
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* This function prepares the return address with a branch-and-link
|
||||
* instruction (bal) and then uses a .cpload to compute the Global
|
||||
* Offset Table (GOT) pointer ($gp). The $gp is then used to load
|
||||
* the address of _do_start() into $t9 just before calling it.
|
||||
* Terminating the stack with a NULL return address.
|
||||
*/
|
||||
__asm__ (
|
||||
" .set push \n"
|
||||
" \n"
|
||||
" .text \n"
|
||||
" .align 4 \n"
|
||||
" .type __start,@function \n"
|
||||
" .globl __start \n"
|
||||
" .globl _start \n"
|
||||
" \n"
|
||||
" .ent __start \n"
|
||||
"__start: \n"
|
||||
" _start: \n"
|
||||
" .frame $sp,32,$ra \n"
|
||||
" .mask 0x80000000,-4 \n"
|
||||
" \n"
|
||||
" .set noreorder \n"
|
||||
" bal 1f \n"
|
||||
" nop \n"
|
||||
"1: \n"
|
||||
" .cpload $ra \n"
|
||||
" .set reorder \n"
|
||||
" \n"
|
||||
" move $a0, $sp \n"
|
||||
" addiu $sp, $sp, (-32) \n"
|
||||
" sw $0, 28($sp) \n"
|
||||
" la $t9, do_mips_start \n"
|
||||
" jalr $t9 \n"
|
||||
" \n"
|
||||
"2: b 2b \n"
|
||||
" .end __start \n"
|
||||
" \n"
|
||||
" .set pop \n"
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
#include "../../arch-common/bionic/__dso_handle.h"
|
||||
#include "atexit.h"
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
extern void __cxa_finalize(void *);
|
||||
extern void *__dso_handle;
|
||||
|
||||
__attribute__((visibility("hidden"),destructor))
|
||||
void __on_dlclose() {
|
||||
__cxa_finalize(&__dso_handle);
|
||||
}
|
||||
|
||||
#include "__dso_handle_so.h"
|
||||
#include "atexit.h"
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "asm_multiarch.h"
|
||||
|
||||
.section .preinit_array, "aw"
|
||||
ASM_ALIGN_TO_PTR_SIZE
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .init_array, "aw"
|
||||
ASM_ALIGN_TO_PTR_SIZE
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .fini_array, "aw"
|
||||
ASM_ALIGN_TO_PTR_SIZE
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .ctors, "aw"
|
||||
.type __CTOR_END__, @object
|
||||
__CTOR_END__:
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .dtors, "aw"
|
||||
.type __DTOR_END__, @object
|
||||
__DTOR_END__:
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .eh_frame,"a",@progbits
|
||||
.align 4
|
||||
.type __FRAME_END__, @object
|
||||
.size __FRAME_END__, 4
|
||||
__FRAME_END__:
|
||||
.zero 4
|
||||
@@ -1,9 +0,0 @@
|
||||
#include "asm_multiarch.h"
|
||||
|
||||
.section .init_array, "aw"
|
||||
ASM_ALIGN_TO_PTR_SIZE
|
||||
ASM_PTR_SIZE(0)
|
||||
|
||||
.section .fini_array, "aw"
|
||||
ASM_ALIGN_TO_PTR_SIZE
|
||||
ASM_PTR_SIZE(0)
|
||||
BIN
ndk/platforms/android-14/arch-arm/lib/libdl.a
Normal file
BIN
ndk/platforms/android-14/arch-arm/lib/libdl.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ndk/platforms/android-14/arch-x86/lib/libdl.a
Normal file
BIN
ndk/platforms/android-14/arch-x86/lib/libdl.a
Normal file
Binary file not shown.
BIN
ndk/platforms/android-21/arch-arm/lib/libdl.a
Normal file
BIN
ndk/platforms/android-21/arch-arm/lib/libdl.a
Normal file
Binary file not shown.
BIN
ndk/platforms/android-21/arch-arm64/lib/libdl.a
Normal file
BIN
ndk/platforms/android-21/arch-arm64/lib/libdl.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
../../arch-mips/lib/libc.a
|
||||
@@ -1 +0,0 @@
|
||||
../../arch-mips/lib/libm.a
|
||||
@@ -1 +0,0 @@
|
||||
../../arch-mips/lib/libstdc++.a
|
||||
@@ -1 +0,0 @@
|
||||
../../arch-mips/lib/libz.a
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ndk/platforms/android-21/arch-x86/lib/libdl.a
Normal file
BIN
ndk/platforms/android-21/arch-x86/lib/libdl.a
Normal file
Binary file not shown.
BIN
ndk/platforms/android-21/arch-x86_64/lib64/libdl.a
Normal file
BIN
ndk/platforms/android-21/arch-x86_64/lib64/libdl.a
Normal file
Binary file not shown.
Reference in New Issue
Block a user