[PATCH] debugedit: Fix 'Unhandled relocation 0 in .debug_info section' on e2k

Mark Wielaard mark@klomp.org
Wed Apr 14 17:24:06 GMT 2021


Hi Vitaly,

On Wed, Apr 14, 2021 at 07:39:08PM +0300, Vitaly Chikunov wrote:
> Fix handling of Elbrus ELF relocatables:
> 
>   /usr/lib/rpm/debugedit: ./lib/modules/5.4.58-elbrus-def-alt1/misc/xt_so.ko: Unhandled relocation 0 in .debug_info section

I cannot test this myself, and I see glibc elf.h doesn't contain any
of the Elbrus relocations (but does know about EM_MCST_ELBRUS). But it
looks obviously correct and won't affect builds on other
systems. Pushed to main.

Thanks,

Mark

> Reported-by: Michael Shigorin <mike@altlinux.org>
> Tested-by: Andrey Savchenko <bircoph@altlinux.org>
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
> ---
>  tools/debugedit.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/debugedit.c b/tools/debugedit.c
> index 917c59b..4527a08 100644
> --- a/tools/debugedit.c
> +++ b/tools/debugedit.c
> @@ -617,6 +617,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype)
>  	    goto fail;
>  	  break;
>  #endif
> +#if defined(EM_MCST_ELBRUS) && defined(R_E2K_32_ABS)
> +	case EM_MCST_ELBRUS:
> +	  if (rtype != R_E2K_32_ABS)
> +		  goto fail;
> +	  break;
> +#endif
>  	default:
>  	fail:
>  	  error (1, 0, "%s: Unhandled relocation %d in %s section",
> -- 
> 2.11.0
> 


More information about the Debugedit mailing list