7 Star 0 Fork 22

src-openEuler/libhugetlbfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Add-support-for-loongarch64-architecture-in-ld.hugetlbfs.patch 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
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))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/libhugetlbfs.git
[email protected]:src-openeuler/libhugetlbfs.git
src-openeuler
libhugetlbfs
libhugetlbfs
master

搜索帮助