Hi Andrea,

I see that, when dumping R_386_RELATIVE relocs in readelf, the format is
like this

    Offset     Info    Type            Sym.Value  Sym. Name
   00003d01  00000008 R_386_RELATIVE


If I understand that type of relocation correctly, another information
is missing: the address contained at the given offset, which ld.so adds
to the load address of the module and then overwrites at the same
offset.

I think it is reasonable to provide that information.  Some users might
need it for debugging or learning purposes.

It could indeed be useful, but there is a downside: adding extra information
like this tends to break the binutils testsuites (since some tests wll not
be expecting the extra output) - and more seriously, it tends to break user
scripts that expect readelf's output to be in a certain format.

This is not to say that the feature should not be added, but rather than it
would probably be best to have it as an optional extra, controlled via a
command line option.  (Eg the --arch-specific option).

Also, this looks like it might be a suitable project for someone interested
in learning about the binutils.  So I am hoping that you, or someone else
will volunteer to have a go ... :-)

Cheers
  Nick



Reply via email to