Skip to content

Commit a222061

Browse files
wildea01masahir0y
authored andcommitted
genksyms: Teach parser about 128-bit built-in types
__uint128_t crops up in a few files that export symbols to modules, so teach genksyms about it and the other GCC built-in 128-bit integer types so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them: | WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocation Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
1 parent 4df607c commit a222061

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎scripts/genksyms/keywords.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ static struct resword {
2525
{ "__volatile__", VOLATILE_KEYW },
2626
{ "__builtin_va_list", VA_LIST_KEYW },
2727

28+
{ "__int128", BUILTIN_INT_KEYW },
29+
{ "__int128_t", BUILTIN_INT_KEYW },
30+
{ "__uint128_t", BUILTIN_INT_KEYW },
31+
2832
// According to rth, c99 defines "_Bool", __restrict", __restrict__", "restrict". KAO
2933
{ "_Bool", BOOL_KEYW },
3034
{ "_restrict", RESTRICT_KEYW },

‎scripts/genksyms/parse.y‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ static void record_compound(struct string_list **keyw,
7676
%token ATTRIBUTE_KEYW
7777
%token AUTO_KEYW
7878
%token BOOL_KEYW
79+
%token BUILTIN_INT_KEYW
7980
%token CHAR_KEYW
8081
%token CONST_KEYW
8182
%token DOUBLE_KEYW
@@ -263,6 +264,7 @@ simple_type_specifier:
263264
| VOID_KEYW
264265
| BOOL_KEYW
265266
| VA_LIST_KEYW
267+
| BUILTIN_INT_KEYW
266268
| TYPE { (*$1)->tag = SYM_TYPEDEF; $$ = $1; }
267269
;
268270

0 commit comments

Comments
 (0)