Dale Curtis | 5f133c4 | 2018-10-29 17:05:33 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is generated from ./asm/directiv.dat |
| 3 | * by perfhash.pl; do not edit. |
| 4 | */ |
| 5 | |
| 6 | #ifndef DIRECTIV_H |
| 7 | #define DIRECTIV_H 1 |
| 8 | |
| 9 | #include "perfhash.h" |
| 10 | |
| 11 | enum directive { |
| 12 | D_none, |
| 13 | D_unknown, |
| 14 | D_corrupt, |
| 15 | D_ABSOLUTE, |
| 16 | D_BITS, |
| 17 | D_COMMON, |
| 18 | D_CPU, |
| 19 | D_DEBUG, |
| 20 | D_DEFAULT, |
| 21 | D_EXTERN, |
| 22 | D_FLOAT, |
| 23 | D_GLOBAL, |
| 24 | D_STATIC, |
| 25 | D_LIST, |
| 26 | D_SECTION, |
| 27 | D_SEGMENT, |
| 28 | D_WARNING, |
| 29 | D_SECTALIGN, |
| 30 | D_PRAGMA, |
Dale Curtis | e293814 | 2020-06-29 15:29:48 -0700 | [diff] [blame] | 31 | D_REQUIRED, |
Dale Curtis | 5f133c4 | 2018-10-29 17:05:33 -0700 | [diff] [blame] | 32 | D_EXPORT, |
| 33 | D_GROUP, |
| 34 | D_IMPORT, |
| 35 | D_LIBRARY, |
| 36 | D_MAP, |
| 37 | D_MODULE, |
| 38 | D_ORG, |
| 39 | D_OSABI, |
| 40 | D_SAFESEH, |
| 41 | D_UPPERCASE, |
| 42 | D_PREFIX, |
| 43 | D_SUFFIX, |
| 44 | D_GPREFIX, |
| 45 | D_GSUFFIX, |
| 46 | D_LPREFIX, |
| 47 | D_LSUFFIX, |
| 48 | D_LIMIT, |
Dale Curtis | e293814 | 2020-06-29 15:29:48 -0700 | [diff] [blame] | 49 | D_OPTIONS, |
Dale Curtis | 5f133c4 | 2018-10-29 17:05:33 -0700 | [diff] [blame] | 50 | D_SUBSECTIONS_VIA_SYMBOLS, |
| 51 | D_NO_DEAD_STRIP, |
| 52 | D_MAXDUMP, |
| 53 | D_NODEPEND, |
| 54 | D_NOSECLABELS |
| 55 | }; |
| 56 | |
| 57 | extern const struct perfect_hash directive_hash; |
Dale Curtis | e293814 | 2020-06-29 15:29:48 -0700 | [diff] [blame] | 58 | extern const char * const directive_tbl[40]; |
Dale Curtis | 5f133c4 | 2018-10-29 17:05:33 -0700 | [diff] [blame] | 59 | |
| 60 | static inline enum directive directive_find(const char *str) |
| 61 | { |
| 62 | return perfhash_find(&directive_hash, str); |
| 63 | } |
| 64 | |
| 65 | static inline const char * directive_name(enum directive x) |
| 66 | { |
| 67 | size_t ix = (size_t)x - (3); |
Dale Curtis | e293814 | 2020-06-29 15:29:48 -0700 | [diff] [blame] | 68 | if (ix >= 40) |
Dale Curtis | 5f133c4 | 2018-10-29 17:05:33 -0700 | [diff] [blame] | 69 | return NULL; |
| 70 | return directive_tbl[ix]; |
| 71 | } |
| 72 | |
| 73 | static inline const char * directive_dname(enum directive x) |
| 74 | { |
| 75 | const char *y = directive_name(x); |
| 76 | return y ? y : invalid_enum_str(x); |
| 77 | } |
| 78 | |
| 79 | #endif /* DIRECTIV_H */ |