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

Seth Forshee seth.forshee at canonical.com
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 aurel32.net>
> 
> BugLink: https://bugs.launchpad.net/bugs/1854974
> 
> 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 aurel32.net>
> Signed-off-by: Daniel Borkmann <daniel at iogearbox.net>
> Tested-by: Michael Ellerman <mpe at ellerman.id.au>
> Link: https://lore.kernel.org/bpf/20191201195728.4161537-1-aurelien@aurel32.net
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>

Applied to unstable/master, thanks!



More information about the kernel-team mailing list