Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

From: Ben Hutchings
Date: Fri Dec 13 2019 - 10:39:56 EST


On Thu, 2019-12-12 at 11:53 +1100, Michael Ellerman wrote:
> Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxx> writes:
[...]
> > This is a patch on binutils carried by Fedora:
> >
> > https://src.fedoraproject.org/rpms/binutils/c/b8265c46f7ddae23a792ee8306fbaaeacba83bf8
> >
> > " b8265c Have readelf display extra symbol information at the end of the line. "
> >
> > It has the following comment:
> >
> > # FIXME: The proper fix would be to update the scripts that are expecting
> > # a fixed output from readelf. But it seems that some of them are
> > # no longer being maintained.
> >
> > This commit is from 2017, had it been on binutils upstream, maybe the situation
> > right now would be different.
>
> Bleeping bleep.
>
> Looks like it was actually ruby that was the original problem:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1479302
>
>
> Why it wasn't hacked around in the ruby package I don't know, doing it in
> the distro binutils package is not ideal.

That wouldn't help people building Ruby from upstream.

Any tool generating tabular output like this should add new fields at
the end (or show them only if requested), since there are bound to be
scripts that parse the output like this. So I think Fedora's change to
readelf was reasonable, but should have been pushed upstream as soon as
possible.

Now everyone is going to have to deal with both formats.

Ben.

--
Ben Hutchings
Horngren's Observation:
Among economists, the real world is often a special case.


Attachment: signature.asc
Description: This is a digitally signed message part