<div dir="ltr"><div dir="ltr"><div>Hello all,<br><br>I am handling a special 
architecture's relocation in COFF. Such relocation (IMAGE_REL_RELSEC) is
 used specifically in static linked executables:<br><br>$ llvm-objdump -d -r foo1.obj:<br><br>Disassembly of section .text:<br><br>00:  mov 04, r2<br>            00000002:  IMAGE_REL_RELSEC   .text<br>04: ...<br><br>$ llvm-objdump -d -r foo2.obj:<br><br>Disassembly of section .text:<br><br>00:  mov 04, r2<br>            00000002:  IMAGE_REL_RELSEC   .text<br>04: ...<br><br>And the expected output will be:<br>$ lld-link /out:foo.exe foo1.obj foo2.obj<br><br>$ llvm-objdump -d foo.exe:<br><br>40000000: mov <span style="color:rgb(255,0,0)">40000004</span>, r2<br>40000004: ...<br>40000008: mov <span style="color:rgb(255,0,0)">4000000c</span>, r2<br>4000000c: ...<br><br></div>PS. 40000004 = Addend (4) + Image Base (40000000) + Instruction RVA (0)<br>       4000000c = Addend (4) + Image Base (40000000) + Instruction RVA (8)<div><br>In
 Summary, such relocation stores addend that relative to .text section. 
Linker is expected to fix the relocation of the instruction by image 
base and the instruction RVA. I am wondering whether there is other 
relocation like IMAGE_REL_RELSEC therefore I can take a look of it.<br><br>Thanks for you reply</div></div></div>