This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]