Weak Alias and Static Question
Joel Sherrill
joel.sherrill@oarcorp.com
Tue Oct 14 20:41:00 GMT 2014
More information about the Binutils mailing list
Tue Oct 14 20:41:00 GMT 2014
- Previous message (by thread): [PATCH] gold: define targ_extra_obj for aarch64
- Next message (by thread): Weak Alias and Static Question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi
Is it possible to have a static default function for a weak alias?
The pattern we are looking at is this in the C source file:
static void bsp_start_default( void ){...}
/*
* By making this a weak alias for bsp_start_default, a brave soul
* can override the actual bsp_start routine used.
*/
void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
The public name is bsp_start() and that is the symbol defined in a public
.h. We want to allow an application can override it.
Will this use of a static behind the non-static work? Any gotchas
we should be aware of?
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
- Previous message (by thread): [PATCH] gold: define targ_extra_obj for aarch64
- Next message (by thread): Weak Alias and Static Question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list