[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2 01/23] include/uk: introduce __weak_alias macro
Hello Yuri, This patch functionally seems fine.I have a question with regard to its usage especially with LTO enabled. The library which uses this macro should not use the function internally as LTO would internally resolve it with the weak symbol. I think it would be wise to add a comment to warn the users of the macro about it. Thanks & Regards Sharan On 2/4/19 3:36 PM, Yuri Volchkov wrote: Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- include/uk/essentials.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uk/essentials.h b/include/uk/essentials.h index 3c16e308..dc1d69b0 100644 --- a/include/uk/essentials.h +++ b/include/uk/essentials.h @@ -76,6 +76,10 @@ extern "C" { #ifndef __align #define __align(bytes) __attribute__((aligned(bytes))) #endif +#ifndef __weak_alias +#define __weak_alias(old, new) \ + extern __typeof(old) new __attribute__((weak, alias(#old))) +#endif/*** Mark a function as constructor _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |