1 Star 0 Fork 147

yueyaoqiang/glibc

forked from src-openEuler/glibc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add-Wl-z-noseparate-code-for-so.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
zhangnaichuan 提交于 2024-04-18 19:36 . add Wl,-z,noseparate-code for so
From 2eb52cc0dd1ce02871d4f863649a8656831805c7 Mon Sep 17 00:00:00 2001
From: hongrongxuan <hongrongxuan@huawei.com>
Date: Tue, 25 Oct 2022 21:24:21 +0800
Subject: [PATCH] add Wl,-z,noseparate-code for so
binutils 2.31 add a separate-code(default)/noseparate-code link option to separate
.rodata from .text segment. Cause this is a dubious feature that intends to
reduce the number of ROP gadgets, and this will reduce batch program's
performance, like unixbench shell program, it will reduce 8%~10%. So
add 'Wl,-z,noseparate-code' to disable this feature.
Refrences:
https://sourceware.org/pipermail/binutils/2018-February/101950.html
https://reviews.llvmm.org/D64903
https://packagehub.suse.com/packages/binutils/2_37-1050100_7_34_1/
---
sysdeps/x86_64/Makeconfig | 1 +
1 file changed, 1 insertion(+)
create mode 100644 sysdeps/x86_64/Makeconfig
diff --git a/sysdeps/x86_64/Makeconfig b/sysdeps/x86_64/Makeconfig
new file mode 100644
index 00000000..5f544fd7
--- /dev/null
+++ b/sysdeps/x86_64/Makeconfig
@@ -0,0 +1 @@
+relro-LDFLAGS = -Wl,-z,relro -Wl,-z,noseparate-code
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yueyaoqiang/glibc.git
git@gitee.com:yueyaoqiang/glibc.git
yueyaoqiang
glibc
glibc
master

搜索帮助