readelf: Fix advance_pc to use op_addr_advance, not just op_advance.
Found by John Mellor-Crummey.
The reason this bug wasn't found earlier is because gcc fixes
minimum_instr_len and max_ops_per_instr to 1 for all architectures
(in theory max_ops_per_instr could be overridden, but I didn't find
any architecture that does). And op_index always seems zero (it looks
like it is really only for special VLWI architectures).
So in all cases I saw it means that:
op_addr_advance = minimum_instr_len * ((op_index + op_advance)
/ max_ops_per_instr)
= 1 * ((0 + op_advance) / 1)
= op_advance
Completely masking the bug.
The libdw dwarf_getsrclines.c implementation does get this right.
Because it doesn't care about the data representation and so does
the calculation directly.
Signed-off-by: Mark Wielaard <mark@klomp.org>