[Bug libdw/22452] Failed to obtain CFI data for a OP_call_frame_CFA when looking for func entrypoc in an s390 kernel module

mark at klomp dot org sourceware-bugzilla@sourceware.org
Mon Nov 20 09:28:00 GMT 2017


--- Comment #12 from Mark Wielaard <mark at klomp dot org> ---
(In reply to H. Brueckner from comment #10)
> (In reply to Mark Wielaard from comment #9)
> > But the output does confirm what I feared. The R_390_PC32 .rela.eh_frame
> > relocations are not "simple". They are load based.
> So now it comes to that point I have feared, as it looks like the libdw just
> performs "simple" relocations.  Your comment and the ebl_reloc_simple_type()
> call in  libdwfl/relocate.c proofs that. Anyhow, do you plan to extend the
> relocation code to support more complex relocations tool?
> > It might not be too hard to add support for those.
> What needs to be done / is necessary for that?

We would need to extend ebl_reloc_simple_type, or add a new ebl backend hook,
that signals a relocation uses the load address. Then in libdwfl/relocate.c use
that to adjust the value to include the load address that libdwfl assigns to
the section (given by struct dwfl_relocation start). This is similar to what
arch/s390/kernel/module.c in the kernel does, but slightly more complicated
because we want it to work "offline" cross architecture.

This would be helpful in general for any ET_REL file for which we want to
inspect the .eh_frame section CFI data. But since this is just for the kernel
modules at the moment I would wait with implementing it till you have
experimented with adjusting the kernel build like suggested in comment #11.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list