linker.h revision a4aafd156068ee174012f28cd894dbecf0e4ab90
11dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project/*
21dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * Copyright (C) 2008 The Android Open Source Project
31dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * All rights reserved.
41dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *
51dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * Redistribution and use in source and binary forms, with or without
61dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * modification, are permitted provided that the following conditions
71dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * are met:
81dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *  * Redistributions of source code must retain the above copyright
91dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *    notice, this list of conditions and the following disclaimer.
101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *  * Redistributions in binary form must reproduce the above copyright
111dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *    notice, this list of conditions and the following disclaimer in
121dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *    the documentation and/or other materials provided with the
131dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *    distribution.
141dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project *
151dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
181dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
191dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
201dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
221dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
231dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
251dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project * SUCH DAMAGE.
271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project */
281dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
291dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#ifndef _LINKER_H_
301dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define _LINKER_H_
311dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
329ec0f03a0d0b17bbb94ac0b9fef6add28a133c3aNick Kralevich#include <elf.h>
33b7beb6907599b36809effe1b4db76039ac649518Pavel Chupin#include <link.h>
341272dbd1d76c979358fff3beae9de0c1462345afElliott Hughes#include <unistd.h>
354688279db5dcc4004941e7f133c4a1c3617d842cElliott Hughes
368f2a5a0b40fc82126c691d5c30131d908772aab7Elliott Hughes#include "private/libc_logging.h"
37650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes
38650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes#define DL_ERR(fmt, x...) \
39650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes    do { \
40650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes      __libc_format_buffer(linker_get_error_buffer(), linker_get_error_buffer_size(), fmt, ##x); \
41650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes      /* If LD_DEBUG is set high enough, log every dlerror(3) message. */ \
42650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes      DEBUG("%s\n", linker_get_error_buffer()); \
437e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes    } while (false)
447e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes
457e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes#define DL_WARN(fmt, x...) \
467e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes    do { \
477e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes      __libc_format_log(ANDROID_LOG_WARN, "linker", fmt, ##x); \
487e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes      __libc_format_fd(2, "WARNING: linker: "); \
497e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes      __libc_format_fd(2, fmt, ##x); \
507e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes      __libc_format_fd(2, "\n"); \
517e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes    } while (false)
527e5a8cc5230dcc027686813e51a1b001cee4c602Elliott Hughes
53650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes
541a6961650c82168864afe040dbdc05977db701dfElliott Hughes// Returns the address of the page containing address 'x'.
551a6961650c82168864afe040dbdc05977db701dfElliott Hughes#define PAGE_START(x)  ((x) & PAGE_MASK)
56c1bd559d5b0fdcc25db2b6ae2705914103b24699David 'Digit' Turner
571a6961650c82168864afe040dbdc05977db701dfElliott Hughes// Returns the offset of address 'x' in its page.
581a6961650c82168864afe040dbdc05977db701dfElliott Hughes#define PAGE_OFFSET(x) ((x) & ~PAGE_MASK)
59c1bd559d5b0fdcc25db2b6ae2705914103b24699David 'Digit' Turner
601a6961650c82168864afe040dbdc05977db701dfElliott Hughes// Returns the address of the next page after address 'x', unless 'x' is
611a6961650c82168864afe040dbdc05977db701dfElliott Hughes// itself at the start of a page.
62c1bd559d5b0fdcc25db2b6ae2705914103b24699David 'Digit' Turner#define PAGE_END(x)    PAGE_START((x) + (PAGE_SIZE-1))
631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
64d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes// Magic shared structures that GDB knows about.
65d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes
66ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughesstruct link_map_t {
67d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  uintptr_t l_addr;
68d4ee82dfa3ba01baa10e3ca48fcb31a27b8a4e81Brian Carlstrom  char*  l_name;
69d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  uintptr_t l_ld;
70ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  link_map_t* l_next;
71ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  link_map_t* l_prev;
721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
741dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project// Values for r_debug->state
751dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Projectenum {
76d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  RT_CONSISTENT,
77d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  RT_ADD,
78d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  RT_DELETE
791dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
801dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
81d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughesstruct r_debug {
82d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  int32_t r_version;
83ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  link_map_t* r_map;
84d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  void (*r_brk)(void);
85d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  int32_t r_state;
86d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  uintptr_t r_ldbase;
871dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
881dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
891dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define FLAG_LINKED     0x00000001
901dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define FLAG_EXE        0x00000004 // The main executable
91468319ce4f3f7383d788b76c09cda2a405311f36Nick Kralevich#define FLAG_LINKER     0x00000010 // The linker itself
921dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
931dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#define SOINFO_NAME_LEN 128
941dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
95ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughestypedef void (*linker_function_t)();
96ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes
974eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes// Android uses REL for 32-bit but only uses RELA for 64-bit.
984eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#if defined(__LP64__)
994eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#define USE_RELA 1
1004eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#endif
1014eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes
10218a206c81d9743481e364384affd43306911283dElliott Hughesstruct soinfo {
103ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes public:
104d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  char name[SOINFO_NAME_LEN];
105c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  const Elf_Phdr* phdr;
106ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t phnum;
107c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Addr entry;
108c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Addr base;
109d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned size;
1101dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
111c620059479c47a78d57086d73726c9adc2f337adElliott Hughes#ifndef __LP64__
112ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  uint32_t unused1;  // DO NOT USE, maintained for compatibility.
113c620059479c47a78d57086d73726c9adc2f337adElliott Hughes#endif
11438bccb271f121fc06eaa0d8fbd3c982bc44c36b7Nick Kralevich
115c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Dyn* dynamic;
1161dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
117c620059479c47a78d57086d73726c9adc2f337adElliott Hughes#ifndef __LP64__
118ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  uint32_t unused2; // DO NOT USE, maintained for compatibility
119ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  uint32_t unused3; // DO NOT USE, maintained for compatibility
120c620059479c47a78d57086d73726c9adc2f337adElliott Hughes#endif
1211dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
122d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  soinfo* next;
123d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned flags;
1241dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
125d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  const char* strtab;
126c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Sym* symtab;
1271dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
128ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t nbucket;
129ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t nchain;
130d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned* bucket;
131d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned* chain;
1321dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1334eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#if !defined(__LP64__)
1344eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes  // This is only used by 32-bit MIPS, but needs to be here for
1354eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes  // all 32-bit architectures to preserve binary compatibility.
1364eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes  unsigned* plt_got;
1374eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#endif
1384eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes
1394eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#if defined(USE_RELA)
1404eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes  Elf_Rela* plt_rela;
141c00f2cb587630d5e954c7f548749f1e3170b3cb1Elliott Hughes  size_t plt_rela_count;
142c00f2cb587630d5e954c7f548749f1e3170b3cb1Elliott Hughes
1434eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes  Elf_Rela* rela;
144c00f2cb587630d5e954c7f548749f1e3170b3cb1Elliott Hughes  size_t rela_count;
145c00f2cb587630d5e954c7f548749f1e3170b3cb1Elliott Hughes#else
146c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Rel* plt_rel;
147ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t plt_rel_count;
1481dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
149c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Rel* rel;
150ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t rel_count;
151c00f2cb587630d5e954c7f548749f1e3170b3cb1Elliott Hughes#endif
1521dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
153ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  linker_function_t* preinit_array;
154ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t preinit_array_count;
1551dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
156ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  linker_function_t* init_array;
157ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t init_array_count;
158ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  linker_function_t* fini_array;
159ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t fini_array_count;
1601dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
161ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  linker_function_t init_func;
162ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  linker_function_t fini_func;
1631dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
1644eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#if defined(__arm__)
165d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  // ARM EABI section used for stack unwinding.
166d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned* ARM_exidx;
167ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t ARM_exidx_count;
1684eeb1f12a8b63afc0d0ad4d466b16fbffb21cd5aElliott Hughes#elif defined(__mips__)
169d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned mips_symtabno;
170d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned mips_local_gotno;
171d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  unsigned mips_gotsym;
1721dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#endif
1731dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
174ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  size_t ref_count;
175ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  link_map_t link_map;
176e83c56dfbb6a9a61f0f18031620322af97e80162Evgeniy Stepanov
177d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  bool constructors_called;
1789ec0f03a0d0b17bbb94ac0b9fef6add28a133c3aNick Kralevich
179d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  // When you read a virtual address from the ELF file, add this
180d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  // value to get the corresponding address in the process' address space.
181c620059479c47a78d57086d73726c9adc2f337adElliott Hughes  Elf_Addr load_bias;
1825ae44f302b7d1d19f25c4c6f125e32dc369961d9Ard Biesheuvel
183e4d792adb8d6f9228b9ac9dc1ad7f43b271f085fElliott Hughes#if !defined(__LP64__)
184d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  bool has_text_relocations;
185e4d792adb8d6f9228b9ac9dc1ad7f43b271f085fElliott Hughes#endif
186d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  bool has_DT_SYMBOLIC;
187d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes
188d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  void CallConstructors();
189d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  void CallDestructors();
190d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes  void CallPreInitConstructors();
191d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes
192d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes private:
193ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  void CallArray(const char* array_name, linker_function_t* functions, size_t count, bool reverse);
194ca0c11bd823f37f03cc8067cb182876827d5275aElliott Hughes  void CallFunction(const char* function_name, linker_function_t function);
1951dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project};
1961dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
197e4d792adb8d6f9228b9ac9dc1ad7f43b271f085fElliott Hughesextern soinfo libdl_info;
1981dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
199a4aafd156068ee174012f28cd894dbecf0e4ab90Elliott Hughesvoid do_android_get_LD_LIBRARY_PATH(char*, size_t);
200cade4c36e7c9c62db3f476a0f9cfc329bac9acb7Elliott Hughesvoid do_android_update_LD_LIBRARY_PATH(const char* ld_library_path);
201e66190d2a97a713ae4b4786e60ca3d67ab8aa192Elliott Hughessoinfo* do_dlopen(const char* name, int flags);
202d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughesint do_dlclose(soinfo* si);
20316084168111cd7d2ac8a6b92e6fa6df5696928a5David 'Digit' Turner
204c620059479c47a78d57086d73726c9adc2f337adElliott HughesElf_Sym* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* start);
205d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughessoinfo* find_containing_library(const void* addr);
2061dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project
207c620059479c47a78d57086d73726c9adc2f337adElliott HughesElf_Sym* dladdr_find_symbol(soinfo* si, const void* addr);
208c620059479c47a78d57086d73726c9adc2f337adElliott HughesElf_Sym* dlsym_handle_lookup(soinfo* si, const char* name);
209d23736e4f228e46304b7cbc674a1d0094d73e0f5Elliott Hughes
210d4ee82dfa3ba01baa10e3ca48fcb31a27b8a4e81Brian Carlstromvoid debuggerd_init();
2110d787c1fa18c6a1f29ef9840e28a68cf077be1deElliott Hughesextern "C" abort_msg_t* gAbortMessage;
21218a206c81d9743481e364384affd43306911283dElliott Hughesextern "C" void notify_gdb_of_libraries();
2134688279db5dcc4004941e7f133c4a1c3617d842cElliott Hughes
214650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hugheschar* linker_get_error_buffer();
215650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughessize_t linker_get_error_buffer_size();
216650be4e584eeab3591b9e273bfd6d169eea60853Elliott Hughes
2171dc9e472e19acfe6dc7f41e429236e7eef7ceda1The Android Open Source Project#endif
218