代码拉取完成,页面将自动刷新
From 135a062d6eda37ac56eb00e3dd11de7e241d619b Mon Sep 17 00:00:00 2001
From: wangqiang <[email protected]>
Date: Fri, 27 Sep 2024 15:21:19 +0800
Subject: [PATCH] Add support for loongarch64 architecture in ld.hugetlbfs
- Added alignment configuration for loongarch64 architecture in the `ld.hugetlbfs` script.
- Set `HPAGE_SIZE` to 32MB and `SLICE_SIZE` to match `HPAGE_SIZE` for loongarch64.
- This ensures correct alignment and hugepage usage for binaries targeting loongarch64 systems.
Fix: https://github.com/libhugetlbfs/libhugetlbfs/issues/91
Referenc: https://github.com/llvm/llvm-project/blob/main/lld/ELF/Driver.cpp#L217
---
ld.hugetlbfs | 1 +
1 file changed, 1 insertion(+)
diff --git a/ld.hugetlbfs b/ld.hugetlbfs
index 5e4e4974..1028d8e2 100755
--- a/ld.hugetlbfs
+++ b/ld.hugetlbfs
@@ -117,6 +117,7 @@ elf64ppc|elf64lppc)
fi ;;
elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
+elf64loongarch) HPAGE_SIZE=$((32*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
armelf*_linux_eabi|aarch64elf*|aarch64linux*|sw_64elf*|sw_64linux*)
hpage_kb=$(cat /proc/meminfo | grep Hugepagesize: | awk '{print $2}')
HPAGE_SIZE=$((hpage_kb * 1024))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。