<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Mar 7, 2011 at 12:18 PM, Muli Ben-Yehuda <span dir="ltr"><<a href="mailto:muli@il.ibm.com">muli@il.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Mon, Mar 07, 2011 at 12:11:36PM +0200, Erez D wrote:<br>
<br>
> I have a function which is not called in a regular way, so gcc<br>
> thinks it is dead code. however it is not, and i am looking for a<br>
> way to tell the linker not to remove it.<br>
<br>
</div>extern<br>
<br>
</blockquote></div>how ? <br>sorry, didn't get what you mean.<br><br>i'll give an example:<br><br>=============== my code ========<br>int x;<br><br>void a()<br>{<br> x=3;<br>}<br><br>int main()<br>{<br> x=0;<br>
return 1;<br>}<br><br>========================<br><br>the linker will remove function a() as it is not called from enywhere.<br>however, i need it to be there, including all of its content.<br><br>how do i do that.<br>
<br>
</div>