For .reloc directive, if the relocation offset is a symbol, then the relocation entry should be placed into relocation section and its sh_info should point to the section where relocation offset symbol at.
Test case:
.text ret nop nop .reloc foo, R_RISCV_32, 6 .data .globl foo foo: .word 0 .word 0 .word 0
The relocation entry should be placed into .reloc.data. And it is also what gnu as does.
Hi @MaskRay , The test case of FT_Relaxable is not added. Because I don't know how to define a symbol which its fragment is FT_Relaxable. Do you have some ideas ?