On Mon, Mar 07, 2011 at 12:27:08PM +0200, Erez D wrote:

> int x;
> 
> void a()

extern void a()

> {
>   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

_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to