Hi Roland,
jankratochvil/abicfi-retval
I think it is obvious, IIRC it was crashing for me before I have implemented
the new abi_cfi methods for non-x86* backends.
Thanks,
Jan
commit 2fac29b29b3eec5358f27f80f4d91c7d7b7d75dc
Author: Jan Kratochvil <jan.kratochvil(a)redhat.com>
Date: Fri Oct 12 20:43:21 2012 +0200
libebl/
2012-10-12 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* ebl-hooks.h (abi_cfi): Extend its comment for return value.
* eblopenbackend.c (default_abi_cfi): Return -1.
* libebl.h (ebl_abi_cfi): Extend its comment for return value.
Signed-off-by: Jan Kratochvil <jan.kratochvil(a)redhat.com>
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index f12613a..e881ce7 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-12 Jan Kratochvil <jan.kratochvil(a)redhat.com>
+
+ * ebl-hooks.h (abi_cfi): Extend its comment for return value.
+ * eblopenbackend.c (default_abi_cfi): Return -1.
+ * libebl.h (ebl_abi_cfi): Extend its comment for return value.
+
2012-08-30 Petr Machata <pmachata(a)redhat.com>
* eblcorenotetypename.c: Handle PPC_VSX, X86_XSTATE,
diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
index f629bce..d3cf3e6 100644
--- a/libebl/ebl-hooks.h
+++ b/libebl/ebl-hooks.h
@@ -151,7 +151,8 @@ int EBLHOOK(disasm) (const uint8_t **startp, const uint8_t *end,
GElf_Addr addr, const char *fmt, DisasmOutputCB_t outcb,
DisasmGetSymCB_t symcb, void *outcbarg, void *symcbarg);
-/* Supply the machine-specific state of CFI before CIE initial programs. */
+/* Supply the machine-specific state of CFI before CIE initial programs.
+ Function returns 0 on success and -1 on error. */
int EBLHOOK(abi_cfi) (Ebl *ebl, Dwarf_CIE *abi_info);
/* Destructor for ELF backend handle. */
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 89e5da5..ed0c0ff 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -750,5 +750,5 @@ static int
default_abi_cfi (Ebl *ebl __attribute__ ((unused)),
Dwarf_CIE *abi_info __attribute__ ((unused)))
{
- return 0;
+ return -1;
}
diff --git a/libebl/libebl.h b/libebl/libebl.h
index 0d5621d..cae31c9 100644
--- a/libebl/libebl.h
+++ b/libebl/libebl.h
@@ -267,7 +267,10 @@ extern int ebl_syscall_abi (Ebl *ebl, int *sp, int *pc,
DWARF register number that identifies the actual PC in machine state.
If there is no canonical DWARF register number with that meaning, it's
left unchanged (callers usually initialize with (Dwarf_Word) -1).
- This value is not used by CFI per se. */
+ This value is not used by CFI per se.
+
+ Function returns 0 on success and -1 for error or unsupported by the
+ backend. */
extern int ebl_abi_cfi (Ebl *ebl, Dwarf_CIE *abi_info)
__nonnull_attribute__ (2);