This is very theoretical compile failure: ELF_ST_TYPE(st_info = A) Cast will bind first and st_info will stop being lvalue: error: lvalue required as left operand of assignment Given that the only use of this macro is ELF_ST_TYPE(sym->st_info) where st_info is "unsigned char" I've decided to remove cast especially given that companion macro ELF_ST_BIND doesn't use cast.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -134,7 +134,7 @@ typedef __s64 Elf64_Sxword; · 133 unmodified lines | ||
| 134 | 134 | #define STT_TLS 6 |
| 135 | 135 | |
| 136 | 136 | #define ELF_ST_BIND(x) ((x) >> 4) |
| 137 | −#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf) | |
| 137 | +#define ELF_ST_TYPE(x) ((x) & 0xf) | |
| 138 | 138 | #define ELF32_ST_BIND(x) ELF_ST_BIND(x) |
| 139 | 139 | #define ELF32_ST_TYPE(x) ELF_ST_TYPE(x) |
| 140 | 140 | #define ELF64_ST_BIND(x) ELF_ST_BIND(x) |