summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-07-06 10:46:38 +0200
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-07-06 10:46:38 +0200
commit2cb6eac064c8334418a76999468f68696a8dfe71 (patch)
treef14b9b3a8249c21c6a84013ed6f3d625f94a4b0c /scripts
parentedbcefc9b0d5925f8be4227fc180a92cd49d126e (diff)
parent8cdeaa50eae8dad34885515f62559ee83e7e8dda (diff)
downloadlinux-2cb6eac064c8334418a76999468f68696a8dfe71.tar.gz
linux-2cb6eac064c8334418a76999468f68696a8dfe71.zip
Merge tag 'v7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
Linux 7.2-rc2
Diffstat (limited to 'scripts')
-rw-r--r--scripts/sorttable.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/sorttable.c b/scripts/sorttable.c
index e8ed11c680c6..d8dc2a1b7c31 100644
--- a/scripts/sorttable.c
+++ b/scripts/sorttable.c
@@ -891,17 +891,22 @@ static int do_file(char const *const fname, void *addr)
table_sort_t custom_sort = NULL;
switch (elf_map_machine(ehdr)) {
- case EM_AARCH64:
#ifdef MCOUNT_SORT_ENABLED
+ case EM_AARCH64:
+ /* arm64 also needs RELA-based weak-function fixups. */
sort_reloc = true;
rela_type = 0x403;
- /* arm64 uses patchable function entry placing before function */
+ /* fallthrough */
+ case EM_RISCV:
+ /* arm64 and RISC-V place patchable entries before the function. */
before_func = 8;
+#else
+ case EM_AARCH64:
+ case EM_RISCV:
#endif
/* fallthrough */
case EM_386:
case EM_LOONGARCH:
- case EM_RISCV:
case EM_S390:
case EM_X86_64:
custom_sort = sort_relative_table_with_data;