<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, Dale<div><br><div><blockquote type="cite"><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000000"><span class="Apple-style-span" style="white-space: normal;"><br></span></font>        </span>movl<span class="Apple-tab-span" style="white-space:pre">        </span>$4, A@GOT+4(%edx,%eax,4)<br></div></blockquote>Assembler ate this without any problems... But I don't see usage of GOT register here and don't think this is valid, since you're patching address inside GOT.</div><div><div><br></div>If A is array, you need to do load first to obtain it's address, e.g. this code:</div><div><div>int A[10];</div><div><br></div><div>int foo() {</div><div>  return A[5];</div><div>}</div><div><br></div></div><div>compiles into (here ecx is GOT register):</div><div><div><br></div><div>        movl    A@GOT(%ecx), %eax</div><div>        movl    20(%eax), %eax</div><div><br></div></div><div><br><blockquote type="cite"><div>(or A+4@GOT) valid on Linux?</div></blockquote><div>This should be invalid.</div><div><br></div></div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>---<br>With best regards, Anton Korobeynikov<br>Faculty of Mathematics and Mechanics, Saint Petersburg State University</div></div></span> </div><br></div></body></html>