[RHBZ#150150] emit aliased static functions in -fno-unit-at-a-time
Jakub Jelinek
jakub@redhat.com
Fri Mar 4 08:03:00 GMT 2005
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
More information about the Gcc-patches
mailing list