This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] record extern weak decls in assemble_external
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Rafael Espindola" <espindola at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "Diego Novillo" <dnovillo at google dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 24 Jul 2008 13:33:06 -0700
- Subject: Re: [patch] record extern weak decls in assemble_external
- References: <38a0d8450807240644u34e8a393w4b07d6dc03d3ddee@mail.gmail.com>
On Thu, Jul 24, 2008 at 6:44 AM, Rafael Espindola <espindola@google.com> wrote:
> This is similar to the previous patch is that it moves the
> responsibility from handling externs away from the FE.
>
> On trunk this is a nop. On lto this fixes
> -------------------------------------------
> extern int v17 __attribute__ ((weak));
> int f1(void) {
> return v17;
> }
> -------------------------------------------
>
> Currently we forget that v17 is weak.
>
>
> OK for trunk? The branch will get it on the next merge.
>
> 2008-07-24 Rafael Espindola <espindola@google.com>
>
> * varasm.c (weak_decls): Move earlier in the file.
> (assemble_external): Add weak decls to the weak_decls list.
> (declare_weak): Don't add decls to the weak_decls list.
ENOPATCH.
-- Pinski