diff --git a/include/compiler.h b/include/compiler.h index 6c5ce8ce..2fa59eff 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -36,7 +36,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # define UNUSED __attribute__((unused)) # define NOINLINE __attribute__((noinline)) # define NORETURN __attribute__((noreturn)) -# define ALIAS(name) __attribute__((alias (#name))) +# define ALIAS2(name) #name +# define ALIAS(name) __attribute__((alias (ALIAS2(name)))) # if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) # define ALWAYS_INLINE inline __attribute__((always_inline)) # define HIDDEN __attribute__((visibility ("hidden"))) diff --git a/include/dwarf.h b/include/dwarf.h index 48831e30..fab93c61 100644 --- a/include/dwarf.h +++ b/include/dwarf.h @@ -413,6 +413,7 @@ extern int dwarf_search_unwind_table (unw_addr_space_t as, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg); + extern int dwarf_find_unwind_table (struct elf_dyn_info *edi, unw_addr_space_t as, char *path, unw_word_t segbase, unw_word_t mapoff, unw_word_t ip); diff --git a/src/dwarf/Gfind_proc_info-lsb.c b/src/dwarf/Gfind_proc_info-lsb.c index 7a7245a1..b5548db1 100644 --- a/src/dwarf/Gfind_proc_info-lsb.c +++ b/src/dwarf/Gfind_proc_info-lsb.c @@ -46,6 +46,12 @@ struct table_entry #include "os-linux.h" #endif +static ALIAS(dwarf_search_unwind_table) int +dwarf_search_unwind_table_int (unw_addr_space_t as, + unw_word_t ip, + unw_dyn_info_t *di, + unw_proc_info_t *pi, + int need_unwind_info, void *arg); static int linear_search (unw_addr_space_t as, unw_word_t ip, unw_word_t eh_frame_start, unw_word_t eh_frame_end, @@ -265,7 +271,7 @@ debug_frame_tab_compare (const void *a, const void *b) return 0; } -int +HIDDEN int dwarf_find_debug_frame (int found, unw_dyn_info_t *di_debug, unw_word_t ip, unw_word_t segbase, const char* obj_name, unw_word_t start, unw_word_t end) @@ -706,14 +712,14 @@ dwarf_find_proc_info (unw_addr_space_t as, unw_word_t ip, /* search the table: */ if (cb_data.di.format != -1) - ret = dwarf_search_unwind_table (as, ip, &cb_data.di, - pi, need_unwind_info, arg); + ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di, + pi, need_unwind_info, arg); else ret = -UNW_ENOINFO; if (ret == -UNW_ENOINFO && cb_data.di_debug.format != -1) - ret = dwarf_search_unwind_table (as, ip, &cb_data.di_debug, pi, - need_unwind_info, arg); + ret = dwarf_search_unwind_table_int (as, ip, &cb_data.di_debug, pi, + need_unwind_info, arg); } else ret = -UNW_ENOINFO;