This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Weak symbols and gcc3.1
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>, "'tromey at redhat dot com'" <tromey at redhat dot com>
- Date: Mon, 8 Apr 2002 09:43:04 +0930
- Subject: Re: Weak symbols and gcc3.1
- References: <40700B4C02ABD5119F000090278766443BF189@hplex1.hpl.hp.com>
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