This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to tell gcc that a static function is really used?
- From: "H . J . Lu" <hjl at lucon dot org>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 17 Jan 2002 14:20:47 -0800
- Subject: How to tell gcc that a static function is really used?
With gcc 3.1,
# gcc -O3 -S x.c -DASM
won't emit __dl_runtime_resolve. How do I tell gcc 3.1 to generate
__dl_runtime_resolve even if -O3 is used?
H.J.
--x.c---
static void __dl_runtime_resolve () __attribute__ ((unused));
static void
__dl_runtime_resolve ()
{
}
#if ASM
asm ("
.align 4
.globl _dl_runtime_resolve
.type _dl_runtime_resolve,@function
_dl_runtime_resolve:
jmp __dl_runtime_resolve
.Lfe2:
.size _dl_runtime_resolve,.Lfe2-_dl_runtime_resolve");
#else
_dl_runtime_resolve ()
{
__dl_runtime_resolve ();
}
#endif