This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] eblopenback: Warn when unable to find ebl backend
- From: Josh Stone <jistone at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 25 Nov 2015 10:14:22 -0800
- Subject: Re: [PATCH] eblopenback: Warn when unable to find ebl backend
On 11/25/2015 04:45 AM, Ben Gamari wrote:
> This could have easily saved me three hours.
> ---
> libebl/eblopenbackend.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
> index b301400..662842d 100644
> --- a/libebl/eblopenbackend.c
> +++ b/libebl/eblopenbackend.c
> @@ -376,7 +376,8 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine)
> result->dlhandle = NULL;
> result->elf = elf;
> result->name = machines[cnt].prefix;
> - fill_defaults (result);
> + fill_defaults (result);
> + fprintf(stderr, "ebl_openbackend: Failed to find backend DSO to handle machine.\n");
>
> return result;
> }
It's not really kosher for a library to dump on stderr. No other part
of elfutils does this AFAICS. Maybe some other location needs to return
better errors from not having the ebl->dlhandle?
(Also, watch your tab changes.)