This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

Re: How to tell gcc that a static function is really used?


On Thu, Jan 17, 2002 at 10:54:14PM -0200, Alexandre Oliva wrote:
> On Jan 17, 2002, "H . J . Lu" <hjl@lucon.org> wrote:
> 
> > won't emit __dl_runtime_resolve. How do I tell gcc 3.1 to generate
> > __dl_runtime_resolve even if -O3 is used?
> 
> Try attribute used instead of unused.
> 
> > static void __dl_runtime_resolve () __attribute__ ((unused));
> 

I'd like to use __attribute__ ((used)) in the mips dynamic linker so
that gcc won't skip a static function. But it is only available in
gcc 3.1. Should I send in a patch with

#if __GNUC_PREREQ (3,1)
# define __attribute_used__ __attribute__ ((__used__))
#else
# define __attribute_used__ __attribute__ ((__unused__))
#endif


H.J.


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