<div><font>Hi:</font></div><div><font><br></font></div><div><font>I'm trying to build a toy backend that produces code without relocation for my toy ELF loader. For now, my InstructionSelection works as intended and for MCInstLowering, I just lower MO_GlobalAddress operands with the following code:</font></div><div><font><br></font></div><div><font>```</font></div><div><font>MCOperand::createExpr(MCSymbolRefExpr::create(getSymbol(MO.getGlobal())))</font></div><div><font>```</font></div><div><font><br></font></div><div><font>However the backend still tries to use relocation even when I've set RelocationModel to Reloc::Static. Further debugging shows that in MCAssembler::evaluateFixup, which in turn calls MCExpr::evaluateAsRelocatableImpl, the evaluation failed due to the MCSymbol is not variable. </font></div><div><font><br></font></div><div>That's where I'm lost with what does variable MCSymbol means, where does it come from and what should I do to fix it. Any help would be appreciated.</div><div><br></div><div>Zhang</div><div><includetail><!--<![endif]--></includetail></div>