APPLIED: [Unstable] libbpf: Fix readelf output parsing on powerpc with recent binutils

Seth Forshee seth.forshee at
Fri Dec 6 04:40:59 UTC 2019

On Tue, Dec 03, 2019 at 02:09:34PM -0300, Thadeu Lima de Souza Cascardo wrote:
> From: Aurelien Jarno <aurelien at>
> BugLink:
> On powerpc with recent versions of binutils, readelf outputs an extra
> field when dumping the symbols of an object file. For example:
>     35: 0000000000000838    96 FUNC    LOCAL  DEFAULT [<localentry>: 8]     1 btf_is_struct
> The extra "[<localentry>: 8]" prevents the GLOBAL_SYM_COUNT variable to
> be computed correctly and causes the check_abi target to fail.
> Fix that by looking for the symbol name in the last field instead of the
> 8th one. This way it should also cope with future extra fields.
> Signed-off-by: Aurelien Jarno <aurelien at>
> Signed-off-by: Daniel Borkmann <daniel at>
> Tested-by: Michael Ellerman <mpe at>
> Link:
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at>

Applied to unstable/master, thanks!

More information about the kernel-team mailing list