Address objtool check failures in lua module

The use of void __attribute__((noreturn)) in kernel builds
was causing lots of warnings if CONFIG_STACK_VALIDATION
is active. For now we just remove this attribute to achieve
clean builds for the Lua module. There was no significant
increase in the time to run the full channel_program ZTS tests.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #7173
This commit is contained in:
Don Brady 2018-02-15 10:53:04 -07:00 committed by Brian Behlendorf
parent ec7c1b914c
commit 62d5c55313
1 changed files with 3 additions and 1 deletions

View File

@ -97,8 +97,10 @@ typedef LUAI_UACNUMBER l_uacNumber;
/* /*
** non-return type ** non-return type
**
** Supress noreturn attribute in kernel builds to avoid objtool check warnings
*/ */
#if defined(__GNUC__) #if defined(__GNUC__) && !defined(_KERNEL)
#define l_noret void __attribute__((noreturn)) #define l_noret void __attribute__((noreturn))
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#define l_noret void __declspec(noreturn) #define l_noret void __declspec(noreturn)