Why link C with crtstuff? [patch]

H.J. Lu hjl@lucon.org
Sun Apr 26 10:26:00 GMT 1998


> 
> 
>   In message < m0yTKUE-000598C@ocean.lucon.org >you write:
>   > BTW, Jim, I cannot get__ attribute__((weak)) to work on extern.
> I don't think it should work on a function declaration.
> 
> Seems to me you have to have it on the function defintion or
> there's no way for it to actually mark the function in question
> as weak.
> 

If that is the case, do I have to use

extern void foo ();
#pragma weak foo

in crtstuff.c to mark foo as weak?


-- 
H.J. Lu (hjl@gnu.org)



More information about the Gcc mailing list