This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] RISC-V: Fix readelf's R_RISCV_{ADD,SUB}{8,16,32,64} handling


On Tue, Oct 17, 2017 at 10:51:37AM -0700, Palmer Dabbelt wrote:
> I'm not entirely sure this is correct, but it does pass the test cases
> (as well as a handful of small modifications I made to them).  The
> implementation is patterned off the existing ones, with the additional
> wrinkle that we have more relocations than the other ports do.
> 
> It feels a bit odd to handle the relocations this way, as I'd expect
> this to either be handled by BFD or at least to look up the relocations

readelf is supposed to be independent of BFD.

> +	static bfd_vma saved_sym1 = 0;
> +	static bfd_vma saved_sym2 = 0;

Ick, no.  Use the section contents instead, just as you do in your
BFD code.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]