X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Flinkage.h;h=8e2f15a63529b391affc44be5cdc5fffcb7542f1;hb=f9747a5a5d34d39843f8007b4230a86bcb852461;hp=39c712eac5b912b6cd2bd1ece7abf17213125552;hpb=643aae1406c93ddc64fcf8c136b47cdffd9c8ccd;p=oweals%2Fu-boot.git diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 39c712eac5..8e2f15a635 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -1,5 +1,5 @@ /* - * U-boot - linkage.h + * U-Boot - linkage.h * * Copyright (c) 2005-2007 Analog Devices Inc. * @@ -11,13 +11,20 @@ #include +/* Some toolchains use other characters (e.g. '`') to mark new line in macro */ +#ifndef ASM_NL +#define ASM_NL ; +#endif + #ifdef __cplusplus #define CPP_ASMLINKAGE extern "C" #else #define CPP_ASMLINKAGE #endif +#ifndef asmlinkage #define asmlinkage CPP_ASMLINKAGE +#endif #define SYMBOL_NAME_STR(X) #X #define SYMBOL_NAME(X) X @@ -41,11 +48,15 @@ #define ALIGN_STR __ALIGN_STR #define LENTRY(name) \ - ALIGN; \ + ALIGN ASM_NL \ SYMBOL_NAME_LABEL(name) #define ENTRY(name) \ - .globl SYMBOL_NAME(name); \ + .globl SYMBOL_NAME(name) ASM_NL \ + LENTRY(name) + +#define WEAK(name) \ + .weak SYMBOL_NAME(name) ASM_NL \ LENTRY(name) #ifndef END @@ -55,7 +66,7 @@ #ifndef ENDPROC #define ENDPROC(name) \ - .type name STT_FUNC; \ + .type name STT_FUNC ASM_NL \ END(name) #endif