1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 03:53:43 +01:00

ALIAS dwarf symbols

This commit is contained in:
Dave Watson 2017-12-28 09:31:11 -08:00
parent e287b69068
commit b56e4cb889
3 changed files with 14 additions and 6 deletions

View file

@ -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")))

View file

@ -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);

View file

@ -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;