From c1c1c06e30f0b3b4ae66fcfec6318a93b8f31569 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 14 Jun 2014 17:15:37 +0200 Subject: libebl: Add ebl_func_addr_mask plus ARM backend implementation. The ARM EABI says that the zero bit of function symbol st_value indicates whether the symbol points to a THUMB or ARM function. Also the return value address in an unwind will contain the same extra bit to indicate whether to return to a regular ARM or THUMB function. Add a new ebl function to mask off such bits and turn a function value into a function address so that we get the actual value that a function symbol or return address points to. It isn't easily possible to reuse the existing ebl_resolve_sym_value for this purpose, so we end up with another hook that can be used from dwfl_module_getsym, handle_cfi and elflint. Signed-off-by: Mark Wielaard --- libebl/ebl-hooks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libebl/ebl-hooks.h') diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h index 65c62ec6..e1186f86 100644 --- a/libebl/ebl-hooks.h +++ b/libebl/ebl-hooks.h @@ -187,7 +187,7 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc, bool *signal_framep); /* Returns true if the value can be resolved to an address in an - allocated section, which will be returned in *SHNDXP. + allocated section, which will be returned in *ADDR. (e.g. function descriptor resolving) */ bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr); -- cgit v1.2.3