lief-project / LIEF

LIEF - Library to Instrument Executable Formats
https://lief.re
Apache License 2.0
4.37k stars 609 forks source link

RISC-V Support for Writing #1001

Closed romainthomas closed 2 weeks ago

romainthomas commented 9 months ago

LIEF should be able to write-back RISC-V binaries while currently it only supports parsing.

byronwatt commented 3 months ago

I'm trying to modify some symbols in a riscv elf file using WrapMaster.py,

but after rewriting the .o files the linker is complaining with:

sample.c:(.text.sample+0x32): dangerous relocation: %pcrel_lo missing matching %pcrel_hi

i was hoping the RISC-V binary problem was only regarding adding new sections, but does it also just not work for modifying symbols ?

romainthomas commented 2 weeks ago

Should be available now