linux/scripts/mod
Masahiro Yamada bd78c9d714 modpost: define TO_NATIVE() using bswap_* functions
The current TO_NATIVE() has some limitations:

 1) You cannot cast the argument.

 2) You cannot pass a variable marked as 'const'.

 3) Passing an array is a bug, but it is not detected.

Impelement TO_NATIVE() using bswap_*() functions. These are GNU
extensions. If we face portability issues, we can port the code from
include/uapi/linux/swab.h.

With this change, get_rel_type_and_sym() can be simplified by casting
the arguments directly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
2023-10-18 17:16:09 +09:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
devicetable-offsets.c vfio/cdx: add support for CDX bus 2023-06-16 12:27:04 -06:00
empty.c
file2alias.c modpost: fix ishtp MODULE_DEVICE_TABLE built on big-endian host 2023-10-18 17:16:09 +09:00
list.h modpost: import include/linux/list.h 2022-05-08 03:17:00 +09:00
Makefile modpost: Optimize symbol search from linear to binary search 2023-10-03 20:25:59 +09:00
mk_elfconfig.c
modpost.c modpost: define TO_NATIVE() using bswap_* functions 2023-10-18 17:16:09 +09:00
modpost.h modpost: define TO_NATIVE() using bswap_* functions 2023-10-18 17:16:09 +09:00
sumversion.c modpost: fix array_size.cocci warning 2022-11-21 10:18:39 +09:00
symsearch.c modpost: Optimize symbol search from linear to binary search 2023-10-03 20:25:59 +09:00