On 08/14/2012 08:17 PM, Anthony Liguori wrote: > Strangely, gcc on Linux absolutely does not want the declaration to be marked > as weak.
Err... that's incorrect. > +CpuDefinitionInfoList GCC_WEAK_DECL *arch_query_cpu_definitions(Error > **errp); ... and probably seen because you put the attribute in the wrong place. You've put the attribute in the middle of the return type, where it is attempting to be applied to the return type pointer. Try one of GCC_WEAK_DECL CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp); CpuDefinitionInfoList * GCC_WEAK_DECL arch_query_cpu_definitions(Error **errp); CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) GCC_WEAK_DECL; I suspect all three alternatives will work. r~