1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef _LINUX_MODULE_SYMBOL_H 2 #ifndef _LINUX_MODULE_SYMBOL_H 3 #define _LINUX_MODULE_SYMBOL_H 3 #define _LINUX_MODULE_SYMBOL_H 4 4 5 /* This ignores the intensely annoying "mappin 5 /* This ignores the intensely annoying "mapping symbols" found in ELF files. */ 6 static inline bool is_mapping_symbol(const cha !! 6 static inline int is_mapping_symbol(const char *str) 7 { 7 { 8 if (str[0] == '.' && str[1] == 'L') 8 if (str[0] == '.' && str[1] == 'L') 9 return true; 9 return true; 10 if (str[0] == 'L' && str[1] == '') 10 if (str[0] == 'L' && str[1] == '') 11 return true; 11 return true; 12 return str[0] == '$'; !! 12 return str[0] == '$' && >> 13 (str[1] == 'a' || str[1] == 'd' || str[1] == 't' || str[1] == 'x') >> 14 && (str[2] == '\0' || str[2] == '.'); 13 } 15 } 14 16 15 #endif /* _LINUX_MODULE_SYMBOL_H */ 17 #endif /* _LINUX_MODULE_SYMBOL_H */ 16 18
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.