delete the chinese comments and fix glibc.spec
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
This commit is contained in:
parent
6adc8e2c86
commit
c2bf6b2f82
2 changed files with 13 additions and 24 deletions
|
@ -1,11 +1,11 @@
|
||||||
From 05a713f0cfade7372d740b92ae6fea95cc8997d7 Mon Sep 17 00:00:00 2001
|
From bc3094ff5de4aa25c03cea459ff93605b9d05ae7 Mon Sep 17 00:00:00 2001
|
||||||
From: yangxiaojuan <yangxiaojuan@loongson.cn>
|
From: yangxiaojuan <yangxiaojuan@loongson.cn>
|
||||||
Date: Mon, 21 Feb 2022 16:28:31 +0800
|
Date: Fri, 11 Mar 2022 15:41:19 +0800
|
||||||
Subject: [PATCH] Add LoongArch support for glibc-2.28
|
Subject: [PATCH] Add LoongArch support for glibc 2.28
|
||||||
|
|
||||||
Change-Id: Ieb9894f5e241c0e04fc9bc2c6e5e3ec84de9177c
|
Change-Id: If8a01ec21a3a9f8e060b3fcad13f04d9cbce3c78
|
||||||
---
|
---
|
||||||
elf/elf.h | 82 +
|
elf/elf.h | 71 +
|
||||||
locale/tst-localedef-path-norm.c | 1 +
|
locale/tst-localedef-path-norm.c | 1 +
|
||||||
scripts/config.sub | 7 +-
|
scripts/config.sub | 7 +-
|
||||||
sysdeps/loongarch/Implies | 5 +
|
sysdeps/loongarch/Implies | 5 +
|
||||||
|
@ -100,7 +100,7 @@ Change-Id: Ieb9894f5e241c0e04fc9bc2c6e5e3ec84de9177c
|
||||||
sysdeps/loongarch/sotruss-lib.c | 51 +
|
sysdeps/loongarch/sotruss-lib.c | 51 +
|
||||||
sysdeps/loongarch/stack_chk_fail_local.c | 1 +
|
sysdeps/loongarch/stack_chk_fail_local.c | 1 +
|
||||||
sysdeps/loongarch/stackinfo.h | 33 +
|
sysdeps/loongarch/stackinfo.h | 33 +
|
||||||
sysdeps/loongarch/start.S | 51 +
|
sysdeps/loongarch/start.S | 49 +
|
||||||
sysdeps/loongarch/stat.c | 1 +
|
sysdeps/loongarch/stat.c | 1 +
|
||||||
sysdeps/loongarch/stat64.c | 1 +
|
sysdeps/loongarch/stat64.c | 1 +
|
||||||
sysdeps/loongarch/sys/asm.h | 49 +
|
sysdeps/loongarch/sys/asm.h | 49 +
|
||||||
|
@ -166,7 +166,7 @@ Change-Id: Ieb9894f5e241c0e04fc9bc2c6e5e3ec84de9177c
|
||||||
.../sysv/linux/loongarch/ucontext-macros.h | 44 +
|
.../sysv/linux/loongarch/ucontext-macros.h | 44 +
|
||||||
.../unix/sysv/linux/loongarch/ucontext_i.sym | 33 +
|
.../unix/sysv/linux/loongarch/ucontext_i.sym | 33 +
|
||||||
sysdeps/unix/sysv/linux/loongarch/vfork.S | 49 +
|
sysdeps/unix/sysv/linux/loongarch/vfork.S | 49 +
|
||||||
161 files changed, 15085 insertions(+), 1 deletion(-)
|
161 files changed, 15072 insertions(+), 1 deletion(-)
|
||||||
create mode 100644 sysdeps/loongarch/Implies
|
create mode 100644 sysdeps/loongarch/Implies
|
||||||
create mode 100644 sysdeps/loongarch/Makefile
|
create mode 100644 sysdeps/loongarch/Makefile
|
||||||
create mode 100644 sysdeps/loongarch/__longjmp.S
|
create mode 100644 sysdeps/loongarch/__longjmp.S
|
||||||
|
@ -327,7 +327,7 @@ Change-Id: Ieb9894f5e241c0e04fc9bc2c6e5e3ec84de9177c
|
||||||
create mode 100644 sysdeps/unix/sysv/linux/loongarch/vfork.S
|
create mode 100644 sysdeps/unix/sysv/linux/loongarch/vfork.S
|
||||||
|
|
||||||
diff --git a/elf/elf.h b/elf/elf.h
|
diff --git a/elf/elf.h b/elf/elf.h
|
||||||
index d6506ea1..62faff3c 100644
|
index d6506ea1..361103f3 100644
|
||||||
--- a/elf/elf.h
|
--- a/elf/elf.h
|
||||||
+++ b/elf/elf.h
|
+++ b/elf/elf.h
|
||||||
@@ -360,6 +360,7 @@ typedef struct
|
@@ -360,6 +360,7 @@ typedef struct
|
||||||
|
@ -338,7 +338,7 @@ index d6506ea1..62faff3c 100644
|
||||||
|
|
||||||
#define EM_NUM 248
|
#define EM_NUM 248
|
||||||
|
|
||||||
@@ -3935,6 +3936,87 @@ enum
|
@@ -3935,6 +3936,76 @@ enum
|
||||||
#define R_NDS32_TLS_TPOFF 102
|
#define R_NDS32_TLS_TPOFF 102
|
||||||
#define R_NDS32_TLS_DESC 119
|
#define R_NDS32_TLS_DESC 119
|
||||||
|
|
||||||
|
@ -369,14 +369,7 @@ index d6506ea1..62faff3c 100644
|
||||||
+#define R_LARCH_MARK_LA 20
|
+#define R_LARCH_MARK_LA 20
|
||||||
+#define R_LARCH_MARK_PCREL 21
|
+#define R_LARCH_MARK_PCREL 21
|
||||||
+
|
+
|
||||||
+/* 这个重定位类型将symbol距离重定位位置的pc相对位置偏移量压栈。
|
|
||||||
+ 它against symbol,因为如果是个常数,虽然在no-pic的情况下可以得到结果,但因为
|
|
||||||
+ 重定位位置相对这个常数的偏移量一定很大,八成填不进去;而在pic的情况下,
|
|
||||||
+ 偏移量无法在静态连接时确定。因此我们约定这个重定位不可能against constant */
|
|
||||||
+#define R_LARCH_SOP_PUSH_PCREL 22
|
+#define R_LARCH_SOP_PUSH_PCREL 22
|
||||||
+
|
|
||||||
+/* 这个重定位against a symbol or a constant。它将symbol的运行时绝对地址
|
|
||||||
+ 或常数压栈,因此在pic的情况下会报错。另外我不太清楚常数和ABS段的关系。 */
|
|
||||||
+#define R_LARCH_SOP_PUSH_ABSOLUTE 23
|
+#define R_LARCH_SOP_PUSH_ABSOLUTE 23
|
||||||
+#define R_LARCH_SOP_PUSH_DUP 24
|
+#define R_LARCH_SOP_PUSH_DUP 24
|
||||||
+#define R_LARCH_SOP_PUSH_GPREL 25
|
+#define R_LARCH_SOP_PUSH_GPREL 25
|
||||||
|
@ -404,10 +397,6 @@ index d6506ea1..62faff3c 100644
|
||||||
+#define R_LARCH_SOP_POP_32_U 46
|
+#define R_LARCH_SOP_POP_32_U 46
|
||||||
+
|
+
|
||||||
+/* used by the static linker for relocating non .text */
|
+/* used by the static linker for relocating non .text */
|
||||||
+/* 这几个重定位类型是为了照顾到 ".dword sym1 - sym2" 这种求差的写法。
|
|
||||||
+ 这些重定位类型处理的是连接时地址,一般情况下它们是成对出现的。
|
|
||||||
+ 在直接求负数".dword - sym1"的情况下,R_LARCH_SUBxx会单独出现。但注意,
|
|
||||||
+ 那个位置填进去的是连接时地址。 */
|
|
||||||
+#define R_LARCH_ADD8 47
|
+#define R_LARCH_ADD8 47
|
||||||
+#define R_LARCH_ADD16 48
|
+#define R_LARCH_ADD16 48
|
||||||
+#define R_LARCH_ADD24 49
|
+#define R_LARCH_ADD24 49
|
||||||
|
@ -9317,10 +9306,10 @@ index 00000000..5f5e6ad1
|
||||||
+#endif /* stackinfo.h */
|
+#endif /* stackinfo.h */
|
||||||
diff --git a/sysdeps/loongarch/start.S b/sysdeps/loongarch/start.S
|
diff --git a/sysdeps/loongarch/start.S b/sysdeps/loongarch/start.S
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..cf0a14b5
|
index 00000000..18933bcc
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/sysdeps/loongarch/start.S
|
+++ b/sysdeps/loongarch/start.S
|
||||||
@@ -0,0 +1,51 @@
|
@@ -0,0 +1,49 @@
|
||||||
+#define __ASSEMBLY__ 1
|
+#define __ASSEMBLY__ 1
|
||||||
+#include <entry.h>
|
+#include <entry.h>
|
||||||
+#include <sys/asm.h>
|
+#include <sys/asm.h>
|
||||||
|
@ -9347,8 +9336,6 @@ index 00000000..cf0a14b5
|
||||||
+ cfi_undefined (1)
|
+ cfi_undefined (1)
|
||||||
+ or a5, a0, zero /* rtld_fini */
|
+ or a5, a0, zero /* rtld_fini */
|
||||||
+
|
+
|
||||||
+ /* 这个main必须要走GOT表拿到。因为main不一定是local的。
|
|
||||||
+ 比如googletest就把main定义在动态库里了。 */
|
|
||||||
+ la.got a0, t0, main
|
+ la.got a0, t0, main
|
||||||
+#ifdef __loongarch64
|
+#ifdef __loongarch64
|
||||||
+ ld.d a1, sp, 0
|
+ ld.d a1, sp, 0
|
||||||
|
|
|
@ -728,7 +728,9 @@ Patch589: glibc-elf-Align-argument-of-__munmap-to-page-size-BZ-28676-3.patch
|
||||||
Patch590: glibc-Support-target-specific-ALIGN-for-variable-alignment-4.patch
|
Patch590: glibc-Support-target-specific-ALIGN-for-variable-alignment-4.patch
|
||||||
Patch591: glibc-elf-Fix-tst-align3.patch
|
Patch591: glibc-elf-Fix-tst-align3.patch
|
||||||
|
|
||||||
|
%ifarch loongarch64
|
||||||
Patch10000: 0001-Add-LoongArch-support-for-glibc-2.28.patch
|
Patch10000: 0001-Add-LoongArch-support-for-glibc-2.28.patch
|
||||||
|
%endif
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Continued list of core "glibc" package information:
|
# Continued list of core "glibc" package information:
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue