summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMaarten Lankhorst <dev@lankhorst.se>2026-07-13 11:32:29 +0200
committerMaarten Lankhorst <dev@lankhorst.se>2026-07-13 11:32:29 +0200
commitac3ee180a8cf9e00ffd4fc8cc670a8b2d6f9b2f2 (patch)
tree389dd45860aaa6d9386b9396bb63fc057ab6ffac /scripts
parente4159045c2704dfe146f0ccb0445d9d074cd6882 (diff)
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
Merge v7.2-rc3 into drm-misc-fixes
Forward from rc1 to rc3 to track upstream closer again. Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
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;