diff options
author | Emil Renner Berthing <kernel@esmil.dk> | 2023-11-01 11:32:59 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-11-07 14:59:30 -0800 |
commit | 8cbe0accc4a6ba7ed34812a1c7e1ba67e7f7b2a4 (patch) | |
tree | 507e4c1a5cb4c6351359693d61471e89877c713c /scripts/bpf_doc.py | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) |
riscv: Avoid unaligned access when relocating modules
With the C-extension regular 32bit instructions are not
necessarily aligned on 4-byte boundaries. RISC-V instructions
are in fact an ordered list of 16bit little-endian
"parcels", so access the instruction as such.
This should also make the code work in case someone builds
a big-endian RISC-V machine.
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20231101-module_relocations-v9-1-8dfa3483c400@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions