<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I have managed to produce correct relocation records for my jump table with the below code, but am baffled to how to emit the text addresses to the data section.<br>
<br>
I'm sure it is just a few lines of code. Any suggestions?<br>
<br>
Jack<br>
<br>
void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) {<br>
<br>
  MCDataFragment *DF = getOrCreateDataFragment();<br>
  int Size = 4; // Assumption is that this is alway for 4 byte value<br>
<br>
  DF->addFixup(MCFixup::Create(DF->getContents().size(),<br>
                               Value,<br>
                               FK_GPRel_4));<br>
  DF->getContents().resize(DF->getContents().size() + Size, 0);<br>
}<br>
<br>
</div>
</body>
</html>