1 Star 0 Fork 75

Slim6882/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0043-remove-symbol-for-examples-and-app.patch 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
From 2587ee2d2c1a7720282d1b290a511cacffad1075 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Mon, 13 May 2024 15:24:06 +0800
Subject: [PATCH] remove symbol for examples and app
The examples and app use static build to link all pmd drivers by default.
In this way, you do not need to add -d parameter to specify dynamic library.
But the size of debuginfo is too large(2GB), therefore, remove app and examples symbols.
---
app/meson.build | 2 +-
examples/meson.build | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/meson.build b/app/meson.build
index e22bbb2..32eea18 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -45,7 +45,7 @@ endif
default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
default_cflags += ['-fPIE', '-pie', '-fPIC', '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-O2', '-Wall']
default_cflags += ['-Wl,-z,relro,-z,now,-z,noexecstack', '-Wtrampolines']
-default_ldflags = []
+default_ldflags = ['-s']
if get_option('default_library') == 'static' and not is_windows
default_ldflags += ['-Wl,--export-dynamic']
endif
diff --git a/examples/meson.build b/examples/meson.build
index 51c975d..bfc7113 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -86,6 +86,7 @@ default_ldflags = dpdk_extra_ldflags
if get_option('default_library') == 'static' and not is_windows
default_ldflags += ['-Wl,--export-dynamic']
endif
+default_ldflags += ['-s']
default_cflags += ['-fPIE', '-pie', '-fPIC', '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-O2', '-Wall']
default_cflags += ['-Wl,-z,relro,-z,now,-z,noexecstack', '-Wtrampolines']
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/slim6882/dpdk.git
git@gitee.com:slim6882/dpdk.git
slim6882
dpdk
dpdk
master

搜索帮助