Re: [U-Boot] [PATCH] riscv: tools: Fix prelink-riscv to work on big endian hosts

2019-07-18 Thread Marcus Comstedt
Hi Rick, Rick Chen writes: > Nitpick: #undef lenn_to_cpu at the end of prelink-riscv.inc. > > Other than that, > Reviewed-by: Rick Chen Thanks for reviewing! Should I post a new version of the patch which adds the missing #undef? In the meantime I have also implemented support for big

Re: [U-Boot] [PATCH] riscv: tools: Fix prelink-riscv to work on big endian hosts

2019-07-18 Thread Rick Chen
Hi Marcus > From: Marcus Comstedt [mailto:mar...@mc.pp.se] > Sent: Monday, July 15, 2019 8:36 PM > To: u-boot@lists.denx.de > Cc: Marcus Comstedt; Rick Jian-Zhi Chen(陳建志) > Subject: [PATCH] riscv: tools: Fix prelink-riscv to work on big endian hosts > > All ELF fields whose values are inspected

[U-Boot] [PATCH] riscv: tools: Fix prelink-riscv to work on big endian hosts

2019-07-15 Thread Marcus Comstedt
All ELF fields whose values are inspected by the code are converted to CPU byteorder first. Values which are copied verbatim (relocation fixups) are not swapped to CPU byteorder and back as it is not needed. Note that it is still assumed that the RISC-V ELF is little endian. In order to support