This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RHBZ#150150] emit aliased static functions in -fno-unit-at-a-time
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Mar 2005 03:02:57 -0500
- Subject: Re: [RHBZ#150150] emit aliased static functions in -fno-unit-at-a-time
- References: <or1xaww1uo.fsf@livre.redhat.lsd.ic.unicamp.br>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Mar 04, 2005 at 12:01:51AM -0300, Alexandre Oliva wrote:
> We refrained from telling the cgraph infrastructure that a symbol is
> referenced through an emitted alias just because we were not in
> -funit-at-a-time, but the assumption that this is only needed in
> unit-at-a-time mode is incorrect: static functions are not emitted at
> the point they're encountered even in -fno-unit-at-a-time, and if we
> don't add the edges to the graph and no other references to the static
> symbol exist, we may end up not emitting it at all.
>
> I'm testing this patch to fix the problem. Ok to install if bootstrap
> and regtest on x86_64-linux-gnu succeeds?
+static __attribute__ ((__section__(".exit.text"))) void xor_exit(void) { }
+void cleanup_module(void) __attribute__((alias("xor_exit")));;
The __attribute__ ((__section__(".exit.text"))) attribute doesn't seem
to have any effect on the testcase, so I think it'd be better to
leave that out from the testcase to avoid confusion.
Jakub