On Thu, Aug 25, 2011 at 5:37 PM, Sriraman Tallam <[email protected]> wrote:
> Hi,
>
> Thanks for all the comments. I am attaching a new patch
> incorporating all of the changes mentioned, mainly :
>
> 1) Make __cpu_indicator_init a constructor in libgcc and guard to call
> it only once.
This is unreliable and you don't need 3 symbols from libgcc. You can use
static struct cpu_indicator
{
feature
model
status
} cpu_indicator;
struct cpu_indicator *
__get_cpu_indicator ()
{
if cpu_indicator is uninitialized; then
initialize cpu_indicator;
return &cpu_indicator;
}
You can simply call __get_cpu_indicator to
get a pointer to cpu_indicator;
--
H.J.