This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Weak symbols and gcc3.1


On Sun, Apr 07, 2002 at 04:28:48PM -0700, Boehm, Hans wrote:
> 
> #pragma weak _DYNAMIC
> 
> int main()
> {
>   extern ElfW(Dyn) _DYNAMIC[];
>   printf("%lx\n", &_DYNAMIC);
>   return 0;
> }

Move the declaration of _DYNAMIC to give it file scope, or use
__attribute__ ((weak)).

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]