The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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 | #ifndef _LINKER_H_ |
| 30 | #define _LINKER_H_ |
| 31 | |
Nick Kralevich | 9ec0f03 | 2012-02-28 10:40:00 -0800 | [diff] [blame] | 32 | #include <elf.h> |
Pavel Chupin | b7beb69 | 2012-08-17 12:53:29 +0400 | [diff] [blame] | 33 | #include <link.h> |
Elliott Hughes | 1272dbd | 2014-01-09 15:45:07 -0800 | [diff] [blame] | 34 | #include <unistd.h> |
Torne (Richard Coles) | 012cb45 | 2014-02-06 14:34:21 +0000 | [diff] [blame] | 35 | #include <android/dlext.h> |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 36 | #include <sys/stat.h> |
Elliott Hughes | 4688279 | 2012-08-03 16:49:39 -0700 | [diff] [blame] | 37 | |
Elliott Hughes | 8f2a5a0 | 2013-03-15 15:30:25 -0700 | [diff] [blame] | 38 | #include "private/libc_logging.h" |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 39 | #include "linked_list.h" |
Elliott Hughes | 650be4e | 2013-03-05 18:47:58 -0800 | [diff] [blame] | 40 | |
| 41 | #define DL_ERR(fmt, x...) \ |
| 42 | do { \ |
| 43 | __libc_format_buffer(linker_get_error_buffer(), linker_get_error_buffer_size(), fmt, ##x); \ |
| 44 | /* If LD_DEBUG is set high enough, log every dlerror(3) message. */ \ |
| 45 | DEBUG("%s\n", linker_get_error_buffer()); \ |
Elliott Hughes | 7e5a8cc | 2013-06-18 13:15:00 -0700 | [diff] [blame] | 46 | } while (false) |
| 47 | |
| 48 | #define DL_WARN(fmt, x...) \ |
| 49 | do { \ |
| 50 | __libc_format_log(ANDROID_LOG_WARN, "linker", fmt, ##x); \ |
| 51 | __libc_format_fd(2, "WARNING: linker: "); \ |
| 52 | __libc_format_fd(2, fmt, ##x); \ |
| 53 | __libc_format_fd(2, "\n"); \ |
| 54 | } while (false) |
| 55 | |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 56 | #if defined(__LP64__) |
| 57 | #define ELFW(what) ELF64_ ## what |
| 58 | #else |
| 59 | #define ELFW(what) ELF32_ ## what |
| 60 | #endif |
Elliott Hughes | 650be4e | 2013-03-05 18:47:58 -0800 | [diff] [blame] | 61 | |
Chris Dearman | 9918665 | 2014-02-06 20:36:51 -0800 | [diff] [blame] | 62 | // mips64 interprets Elf64_Rel structures' r_info field differently. |
| 63 | // bionic (like other C libraries) has macros that assume regular ELF files, |
| 64 | // but the dynamic linker needs to be able to load mips64 ELF files. |
| 65 | #if defined(__mips__) && defined(__LP64__) |
| 66 | #undef ELF64_R_SYM |
| 67 | #undef ELF64_R_TYPE |
| 68 | #undef ELF64_R_INFO |
| 69 | #define ELF64_R_SYM(info) (((info) >> 0) & 0xffffffff) |
| 70 | #define ELF64_R_SSYM(info) (((info) >> 32) & 0xff) |
| 71 | #define ELF64_R_TYPE3(info) (((info) >> 40) & 0xff) |
| 72 | #define ELF64_R_TYPE2(info) (((info) >> 48) & 0xff) |
| 73 | #define ELF64_R_TYPE(info) (((info) >> 56) & 0xff) |
| 74 | #endif |
| 75 | |
Elliott Hughes | 1a69616 | 2012-11-01 13:49:32 -0700 | [diff] [blame] | 76 | // Returns the address of the page containing address 'x'. |
| 77 | #define PAGE_START(x) ((x) & PAGE_MASK) |
David 'Digit' Turner | c1bd559 | 2012-06-19 11:21:29 +0200 | [diff] [blame] | 78 | |
Elliott Hughes | 1a69616 | 2012-11-01 13:49:32 -0700 | [diff] [blame] | 79 | // Returns the offset of address 'x' in its page. |
| 80 | #define PAGE_OFFSET(x) ((x) & ~PAGE_MASK) |
David 'Digit' Turner | c1bd559 | 2012-06-19 11:21:29 +0200 | [diff] [blame] | 81 | |
Elliott Hughes | 1a69616 | 2012-11-01 13:49:32 -0700 | [diff] [blame] | 82 | // Returns the address of the next page after address 'x', unless 'x' is |
| 83 | // itself at the start of a page. |
David 'Digit' Turner | c1bd559 | 2012-06-19 11:21:29 +0200 | [diff] [blame] | 84 | #define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1)) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 85 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 86 | #define FLAG_LINKED 0x00000001 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 87 | #define FLAG_EXE 0x00000004 // The main executable |
Nick Kralevich | 468319c | 2011-11-11 15:53:17 -0800 | [diff] [blame] | 88 | #define FLAG_LINKER 0x00000010 // The linker itself |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 89 | #define FLAG_NEW_SOINFO 0x40000000 // new soinfo format |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 90 | |
| 91 | #define SOINFO_NAME_LEN 128 |
| 92 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 93 | typedef void (*linker_function_t)(); |
| 94 | |
Chris Dearman | 9918665 | 2014-02-06 20:36:51 -0800 | [diff] [blame] | 95 | // Android uses RELA for aarch64 and x86_64. mips64 still uses REL. |
| 96 | #if defined(__aarch64__) || defined(__x86_64__) |
Elliott Hughes | 4eeb1f1 | 2013-10-25 17:38:02 -0700 | [diff] [blame] | 97 | #define USE_RELA 1 |
| 98 | #endif |
| 99 | |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 100 | struct soinfo; |
| 101 | |
| 102 | class SoinfoListAllocator { |
| 103 | public: |
| 104 | static LinkedListEntry<soinfo>* alloc(); |
| 105 | static void free(LinkedListEntry<soinfo>* entry); |
| 106 | private: |
| 107 | // unconstructable |
| 108 | DISALLOW_IMPLICIT_CONSTRUCTORS(SoinfoListAllocator); |
| 109 | }; |
| 110 | |
Elliott Hughes | 18a206c | 2012-10-29 17:37:13 -0700 | [diff] [blame] | 111 | struct soinfo { |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 112 | public: |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 113 | typedef LinkedList<soinfo, SoinfoListAllocator> soinfo_list_t; |
| 114 | public: |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 115 | char name[SOINFO_NAME_LEN]; |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 116 | const ElfW(Phdr)* phdr; |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 117 | size_t phnum; |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 118 | ElfW(Addr) entry; |
| 119 | ElfW(Addr) base; |
Weiwu Chen | 5ceb889 | 2013-12-03 19:47:34 +0800 | [diff] [blame] | 120 | size_t size; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 121 | |
Elliott Hughes | c620059 | 2013-09-30 18:43:46 -0700 | [diff] [blame] | 122 | #ifndef __LP64__ |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 123 | uint32_t unused1; // DO NOT USE, maintained for compatibility. |
Elliott Hughes | c620059 | 2013-09-30 18:43:46 -0700 | [diff] [blame] | 124 | #endif |
Nick Kralevich | 38bccb2 | 2011-08-29 13:49:22 -0700 | [diff] [blame] | 125 | |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 126 | ElfW(Dyn)* dynamic; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 127 | |
Elliott Hughes | c620059 | 2013-09-30 18:43:46 -0700 | [diff] [blame] | 128 | #ifndef __LP64__ |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 129 | uint32_t unused2; // DO NOT USE, maintained for compatibility |
| 130 | uint32_t unused3; // DO NOT USE, maintained for compatibility |
Elliott Hughes | c620059 | 2013-09-30 18:43:46 -0700 | [diff] [blame] | 131 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 132 | |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 133 | soinfo* next; |
| 134 | unsigned flags; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 135 | |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 136 | const char* strtab; |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 137 | ElfW(Sym)* symtab; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 138 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 139 | size_t nbucket; |
| 140 | size_t nchain; |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 141 | unsigned* bucket; |
| 142 | unsigned* chain; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 143 | |
Chris Dearman | 9918665 | 2014-02-06 20:36:51 -0800 | [diff] [blame] | 144 | #if defined(__mips__) || !defined(__LP64__) |
| 145 | // This is only used by mips and mips64, but needs to be here for |
Elliott Hughes | 4eeb1f1 | 2013-10-25 17:38:02 -0700 | [diff] [blame] | 146 | // all 32-bit architectures to preserve binary compatibility. |
Chris Dearman | 9918665 | 2014-02-06 20:36:51 -0800 | [diff] [blame] | 147 | ElfW(Addr)** plt_got; |
Elliott Hughes | 4eeb1f1 | 2013-10-25 17:38:02 -0700 | [diff] [blame] | 148 | #endif |
| 149 | |
| 150 | #if defined(USE_RELA) |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 151 | ElfW(Rela)* plt_rela; |
Elliott Hughes | c00f2cb | 2013-10-04 17:01:33 -0700 | [diff] [blame] | 152 | size_t plt_rela_count; |
| 153 | |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 154 | ElfW(Rela)* rela; |
Elliott Hughes | c00f2cb | 2013-10-04 17:01:33 -0700 | [diff] [blame] | 155 | size_t rela_count; |
| 156 | #else |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 157 | ElfW(Rel)* plt_rel; |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 158 | size_t plt_rel_count; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 159 | |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 160 | ElfW(Rel)* rel; |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 161 | size_t rel_count; |
Elliott Hughes | c00f2cb | 2013-10-04 17:01:33 -0700 | [diff] [blame] | 162 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 163 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 164 | linker_function_t* preinit_array; |
| 165 | size_t preinit_array_count; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 166 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 167 | linker_function_t* init_array; |
| 168 | size_t init_array_count; |
| 169 | linker_function_t* fini_array; |
| 170 | size_t fini_array_count; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 171 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 172 | linker_function_t init_func; |
| 173 | linker_function_t fini_func; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 174 | |
Elliott Hughes | 4eeb1f1 | 2013-10-25 17:38:02 -0700 | [diff] [blame] | 175 | #if defined(__arm__) |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 176 | // ARM EABI section used for stack unwinding. |
| 177 | unsigned* ARM_exidx; |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 178 | size_t ARM_exidx_count; |
Elliott Hughes | 4eeb1f1 | 2013-10-25 17:38:02 -0700 | [diff] [blame] | 179 | #elif defined(__mips__) |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 180 | unsigned mips_symtabno; |
| 181 | unsigned mips_local_gotno; |
| 182 | unsigned mips_gotsym; |
| 183 | #endif |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 184 | |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 185 | size_t ref_count; |
Elliott Hughes | 3a9c5d6 | 2014-02-10 13:31:13 -0800 | [diff] [blame] | 186 | link_map link_map_head; |
Evgeniy Stepanov | e83c56d | 2011-12-21 13:03:54 +0400 | [diff] [blame] | 187 | |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 188 | bool constructors_called; |
Nick Kralevich | 9ec0f03 | 2012-02-28 10:40:00 -0800 | [diff] [blame] | 189 | |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 190 | // When you read a virtual address from the ELF file, add this |
| 191 | // value to get the corresponding address in the process' address space. |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 192 | ElfW(Addr) load_bias; |
Ard Biesheuvel | 5ae44f3 | 2012-08-30 12:48:32 +0200 | [diff] [blame] | 193 | |
Elliott Hughes | e4d792a | 2013-10-28 14:19:05 -0700 | [diff] [blame] | 194 | #if !defined(__LP64__) |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 195 | bool has_text_relocations; |
Elliott Hughes | e4d792a | 2013-10-28 14:19:05 -0700 | [diff] [blame] | 196 | #endif |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 197 | bool has_DT_SYMBOLIC; |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 198 | void CallConstructors(); |
| 199 | void CallDestructors(); |
| 200 | void CallPreInitConstructors(); |
| 201 | |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 202 | void add_child(soinfo* child); |
| 203 | void remove_all_links(); |
| 204 | |
| 205 | void set_st_dev(dev_t st_dev); |
| 206 | void set_st_ino(ino_t st_ino); |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame^] | 207 | void set_has_ifuncs(bool ifunc); |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 208 | ino_t get_st_ino(); |
| 209 | dev_t get_st_dev(); |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame^] | 210 | bool get_has_ifuncs(); |
| 211 | |
| 212 | |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 213 | |
| 214 | soinfo_list_t& get_children(); |
| 215 | |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 216 | private: |
Elliott Hughes | ca0c11b | 2013-03-12 10:40:45 -0700 | [diff] [blame] | 217 | void CallArray(const char* array_name, linker_function_t* functions, size_t count, bool reverse); |
| 218 | void CallFunction(const char* function_name, linker_function_t function); |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 219 | |
| 220 | private: |
| 221 | // This part of the structure is only available |
| 222 | // when FLAG_NEW_SOINFO is set in this->flags. |
| 223 | unsigned int version; |
| 224 | |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame^] | 225 | bool has_ifuncs; |
| 226 | |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 227 | dev_t st_dev; |
| 228 | ino_t st_ino; |
| 229 | |
| 230 | // dependency graph |
| 231 | soinfo_list_t children; |
| 232 | soinfo_list_t parents; |
| 233 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 234 | }; |
| 235 | |
Dmitriy Ivanov | d59e500 | 2014-05-09 09:10:14 -0700 | [diff] [blame] | 236 | extern soinfo* get_libdl_info(); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 237 | |
Elliott Hughes | a4aafd1 | 2014-01-13 16:37:47 -0800 | [diff] [blame] | 238 | void do_android_get_LD_LIBRARY_PATH(char*, size_t); |
Elliott Hughes | cade4c3 | 2012-12-20 14:42:14 -0800 | [diff] [blame] | 239 | void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path); |
Elliott Hughes | 1a58629 | 2014-06-03 16:23:08 -0700 | [diff] [blame] | 240 | soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo); |
Dmitriy Ivanov | b648a8a | 2014-05-19 15:06:58 -0700 | [diff] [blame] | 241 | void do_dlclose(soinfo* si); |
David 'Digit' Turner | 1608416 | 2012-06-12 16:25:37 +0200 | [diff] [blame] | 242 | |
Dmitriy Ivanov | d97e9f5 | 2014-06-29 12:28:37 -0700 | [diff] [blame] | 243 | ElfW(Sym)* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* start, soinfo* caller_si); |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 244 | soinfo* find_containing_library(const void* addr); |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 245 | |
Elliott Hughes | 0266ae5 | 2014-02-10 17:46:57 -0800 | [diff] [blame] | 246 | ElfW(Sym)* dladdr_find_symbol(soinfo* si, const void* addr); |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 247 | ElfW(Sym)* dlsym_handle_lookup(soinfo* si, soinfo** found, const char* name, soinfo* caller_si); |
Elliott Hughes | d23736e | 2012-11-01 15:16:56 -0700 | [diff] [blame] | 248 | |
Brian Carlstrom | d4ee82d | 2013-02-28 15:58:45 -0800 | [diff] [blame] | 249 | void debuggerd_init(); |
Elliott Hughes | 1728b23 | 2014-05-14 10:02:03 -0700 | [diff] [blame] | 250 | extern "C" abort_msg_t* g_abort_message; |
Elliott Hughes | 18a206c | 2012-10-29 17:37:13 -0700 | [diff] [blame] | 251 | extern "C" void notify_gdb_of_libraries(); |
Elliott Hughes | 4688279 | 2012-08-03 16:49:39 -0700 | [diff] [blame] | 252 | |
Elliott Hughes | 650be4e | 2013-03-05 18:47:58 -0800 | [diff] [blame] | 253 | char* linker_get_error_buffer(); |
| 254 | size_t linker_get_error_buffer_size(); |
| 255 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 256 | #endif |