1a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 2a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * Copyright (C) 2007 The Android Open Source Project 3a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * 4a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 5a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * you may not use this file except in compliance with the License. 6a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * You may obtain a copy of the License at 7a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * 8a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 9a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * 10a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 11a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 12a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * See the License for the specific language governing permissions and 14a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * limitations under the License. 15a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 16a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 17e2a8b1fd19fb3a8ead2ba28ddba27be19fa978b5Matt Fischer#include <dlfcn.h> 187ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughes#include <link.h> 19a4aafd156068ee174012f28cd894dbecf0e4ab90Elliott Hughes#include <stdlib.h> 20012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles)#include <android/dlext.h> 21a4aafd156068ee174012f28cd894dbecf0e4ab90Elliott Hughes 227ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughes// These are stubs for functions that are actually defined 237ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughes// in the dynamic linker and hijacked at runtime. 24cade4c36e7c9c62db3f476a0f9cfc329bac9acb7Elliott Hughes 257ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesvoid* dlopen(const char* filename __unused, int flag __unused) { return 0; } 267ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesconst char* dlerror(void) { return 0; } 277ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesvoid* dlsym(void* handle __unused, const char* symbol __unused) { return 0; } 287ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesint dladdr(const void* addr __unused, Dl_info* info __unused) { return 0; } 297ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesint dlclose(void* handle __unused) { return 0; } 3022d629211d72adaf46f3fc48f59540f8e5798b1eElliott Hughes 317ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughes#if defined(__arm__) 327ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughes_Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc __unused, int* pcount __unused) { return 0; } 3324053a461e7a20f34002262c1bb122023134989dChristopher Ferris#endif 3422d629211d72adaf46f3fc48f59540f8e5798b1eElliott Hughes 357ac975146ea7bc1ee7499bafc4e0b57b7ee56c98Elliott Hughesint dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data) __unused, void* data __unused) { return 0; } 36012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles) 37012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles)void android_get_LD_LIBRARY_PATH(char* buffer __unused, size_t buffer_size __unused) { } 38012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles)void android_update_LD_LIBRARY_PATH(const char* ld_library_path __unused) { } 39012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles) 40012cb4583a5f8564059142bb1900ea3a31e7cfa9Torne (Richard Coles)void* android_dlopen_ext(const char* filename __unused, int flag __unused, const android_dlextinfo* extinfo __unused) { return 0; } 41