PATCH: Don't allow weak variables in COMMON

David S. Miller davem@redhat.com
Fri May 24 01:04:00 GMT 2002


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Thu, 23 May 2002 11:05:39 -0700
   
   If you tried something like:
   
     __attribute__((weak) int i;
   
   you got an assembler error telling you that you can't have weak
   symbols in common.

What about similar situations using __attribute__(section("foo"))?
Should we un-common the thing in those cases too?

I personally think it is a bug to mark something implicitly BSS then
tell the compiler "oh sorry, I didn't want it to be BSS actually".

Just un-BSS it by initializing it to zero if that is what you want.



More information about the Gcc-patches mailing list