[PATCH][testsuite] Handle readelf following links by default

Mark Wielaard mark@klomp.org
Sun Feb 28 15:21:34 GMT 2021


Hi,

Added Nick to the CC since he seems to have introduced this new
"default".

On Sun, Feb 28, 2021 at 08:36:49AM +0100, Tom de Vries wrote:
> Since binutils commit c46b706620e "Change the readelf and objdump programs so
> that they will automatically follow links to separate debug info files." there
> are a few FAILs in the dwz testsuite.
> 
> In the case of gnu-debugaltlink-name.sh, I think this is caused by a binutils
> bug, filed as PR27478.
> 
> In the case of odr-struct-multifile.sh, this is just due to flipping the
> default.
> 
> Fix/workaround this by testing whether the new -Wn readelf flag is supported,
> and if so, adding it to the readelf call.
> 
> Any comments?

I think this is an odd bug in binutils.  --debug-dump=follow-links
seems to confuses two separate concepts. First whether or not to show
data that might be stored in a "linked" file. Like whether to show a
DW_FORM_GNU_alt_strp value. This seems fine and should indeed be done
by default (that is also what eu-readelf does).

Second whether to dump whole sections from the linked files. That is
IMHO something completely different and causes the bug you filed. This
second use should not be the default. And probably should be called
something different, maybe --debug-dump=dump-links.

Since this is luckily not yet in any released binutils lets fix this
in binutils instead of trying to work around it in dwz. I am pretty
sure it will break various other testsuites that rely on binutils
readelf --debug-dump output if it suddenly also dumped sections from
other files by default.

Cheers,

Mark


More information about the Dwz mailing list