<div class="__aliyun_email_body_block"><div  style="font-family: Tahoma, Arial, STHeitiSC-Light, SimSun"><div  style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px; color: rgb(0, 0, 0);">> Hi Zhuang,<br >><br >> Thanks for the new update, This fixes the mixed-marker case. However, I<br >> can still reproduce the same "missing matching %pcrel_hi"<br >><br >> diagnostic with both relocations marked and both addends zero. The HI<br >> label can be a local function symbol with a nonzero st_size, for example:<br >><br >>         .type load_data,@function<br >>   load_data:<br >>         auipc t0,%pcrel_hi(target)<br >>         lw    a0,%pcrel_lo(load_data)(t0)<br >>         ret<br >>         .size load_data,.-load_data<br >><br >> With a 4-byte target at 'gp + 0x7f4', the HI passes the GP range check<br >> using the target's size. The LO then uses the 12-byte size of<br >><br >> 'load_data' and fails the same check after the HI has been selected for<br >> deletion.<br >><br >> Could we restore the  'reserve_size' here as well, may like:<br >><br >>     hi_reloc = *hi;<br >>     symval = hi_reloc.hi_addr;<br >>     sym_sec = hi_reloc.sym_sec;<br >>     reserve_size = hi_reloc.reserve_size;<br >><br >> And I think we also check each LO's effective target before deleting the<br >> HI? Here 'symval' already includes the HI addend, so the address to check is<br >> 'symval + lo->rel->r_addend'.<br >> For example, with target = 0x7fc, a load at target fits an x0-relative<br >> immediate, but a store at target + 8 does not. If any LO cannot reach<br >> its effective<br >> target from either available base, please keep the original group.<br >><br >> Thanks,<br >> Jiawei<br ><br ></div><div >Hi Jiawei,</div><div >Thank you for the comments! Yes I agree that we need to fix both issues.</div><div >For the reserve_size issue, we need to keep HI/LO checkes consistent.</div><div >For the other one, yes we need to check each referring LO can actually</div><div >be relaxed when handling HI, not only just checking the mark.</div><div >My first instinct is that we need to refactor the checking part out, which can be</div><div >reused both in the original check-LO-path and the new check-LO-before-HI path.</div><div >I'll work on it and submit improvements soon, if you agree with that :)</div><div ><br ></div><div >And again, thanks <span  style="color: rgb(0, 0, 0);">for catching those I've overlooked</span>!</div><div ><br ></div><div >Best,</div><div >Luke Zhuang</div></div></div>