looking for a way to tell gcc not to remove some code he thinks is unreachable.
Erez D
erez0001 at gmail.com
Mon Mar 7 14:06:28 IST 2011
On Mon, Mar 7, 2011 at 1:33 PM, Muli Ben-Yehuda <muli at il.ibm.com> wrote:
> On Mon, Mar 07, 2011 at 12:27:08PM +0200, Erez D wrote:
>
> > int x;
> >
> > void a()
>
> extern void a()
>
doesn't work
avr32-gcc 4.3.2
>
> > {
> > x=3;
> > }
> >
> > int main()
> > {
> > x=0;
> > return 1;
> > }
> >
> > ========================
> >
> > the linker will remove function a() as it is not called from
> > enywhere. however, i need it to be there, including all of its
> > content.
>
> gcc (ld) 4.4.3 does not remove it in this case. What linker are you
> using?
>
> Cheers,
> Muli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110307/54722c1f/attachment.html>
More information about the Linux-il
mailing list