• Home
Name Date Size #Lines LOC

..--

backends/22-Oct-2025-17,12310,958

config/22-Oct-2025-2,4361,817

debuginfod/22-Oct-2025-8,5246,455

doc/22-Oct-2025-2,9682,437

lib/22-Oct-2025-3,9602,421

libasm/22-Oct-2025-4,2902,103

libcpu/22-Oct-2025-8,3586,985

libdw/22-Oct-2025-25,69215,855

libdwelf/22-Oct-2025-1,6081,015

libdwfl/22-Oct-2025-21,74414,897

libebl/22-Oct-2025-6,2333,503

libelf/22-Oct-2025-24,58914,890

m4/22-Oct-2025-1,094850

po/22-Oct-2025-39,30331,926

src/22-Oct-2025-41,72532,342

tests/22-Oct-2025-62,90645,733

.gitignoreD22-Oct-2025274 3332

AUTHORSD22-Oct-20251.5 KiB105104

AUTHORS.shD22-Oct-2025358 134

BUILD.gnD22-Oct-20252 KiB8366

CONTRIBUTINGD22-Oct-20256 KiB143108

COPYINGD22-Oct-202534.3 KiB675553

COPYING-GPLV2D22-Oct-202517.7 KiB340281

COPYING-LGPLV3D22-Oct-20257.5 KiB166128

ChangeLogD22-Oct-202529.6 KiB1,098629

GPG-KEYD22-Oct-20257 KiB115113

Makefile.amD22-Oct-20253.1 KiB10355

NEWSD22-Oct-202552.7 KiB1,8391,102

NOTESD22-Oct-20253 KiB9669

OAT.xmlD22-Oct-20255.6 KiB8262

READMED22-Oct-20251.2 KiB3422

README.OpenSourceD22-Oct-2025475 1211

README_OpenHarmony.mdD22-Oct-20252.9 KiB12692

SECURITYD22-Oct-20252.5 KiB5742

THANKSD22-Oct-2025193 75

TODOD22-Oct-20255.3 KiB196124

bundle.jsonD22-Oct-20251,011 3736

config.hD22-Oct-20255.4 KiB19244

configure.acD22-Oct-202536.1 KiB941825

elfutils_config.gniD22-Oct-202525 KiB510502

README

1The elfutils project provides libraries and tools for ELF files and DWARF data.
2
3The project home is http://elfutils.org/
4
5Releases are published at ftp://sourceware.org/pub/elfutils/
6Which can also be found at https://sourceware.org/elfutils/ftp/
7
8To build a release do: ./configure && make && make check
9Please check the configure summary to make sure all recommended
10features are enabled. There should be no failures after make check.
11
12Please reports bugs at https://sourceware.org/bugzilla/
13
14The current elfutils source code can be checked out with
15git clone git://sourceware.org/git/elfutils.git
16
17To build a git checkout do:
18  autoreconf -i -f && \
19  ./configure --enable-maintainer-mode && \
20  make && make check
21
22The developer mailinglist to send patches to is
23elfutils-devel@sourceware.org.
24https://sourceware.org/ml/elfutils-devel/
25
26To subscribe send an email to elfutils-devel-subscribe@sourceware.org
27Or use the form at https://sourceware.org/mailman/listinfo/elfutils-devel
28
29See the CONTRIBUTING file for how to propose patches to the code.
30
31See the NOTES files for some design decisions and notes.
32
33See the SECURITY file for defining and handling security-sensitive bugs.
34

README.OpenSource

1[
2  {
3    "Name": "elfutils",
4    "License": "LGPL-2.1, LGPL-3.0, GPL-2.0",
5    "License File": "COPYING-GPLV2",
6    "Version Number": "0.190",
7    "Owner": "zhanghaibo0@huawei.com",
8    "Upstream URL": "https://sourceware.org/elfutils/",
9    "Description": "A collection of tools and libraries for reading, creating and modifying ELF binaries, finding and processing DWARF debug data, symbols, thread status, and stack trace of processes and core files on GNU/Linux."
10  }
11]
12

README_OpenHarmony.md

1# elfutils
2
3仓库包含第三方开源软件elfutils,elfutils是一个用于读取、创建和修改ELF二进制文件,查找和处理GNU/Linux上进程和核心文件的DWARF调试数据、符号、线程状态和堆栈跟踪的工具和库的集合。libabigail软件依赖了elfutils。
4
5## 目录结构
6
7```
8backends/      不同平台的后端实现
9doc/           文档
10lib/           公共库源码
11libasm/        asm相关库源码
12libcpu/        cpu相关库源码
13libdw/         dw相关库源码
14libdwelf/      dwelf相关库源码
15libdwfl/       dwfl相关库源码
16libebl/        ebl相关库源码
17libelf/        elf相关库源码
18src/           源文件
19tests/         测试目录
20COPYING        证书文件
21COPYING-GPLV2  证书文件
22COPYING-LGPLV3 证书文件
23README         README说明
24```
25
26## OpenHarmony如何使用elfutils
27
28OpenHarmony上elfutils是用作libabigail的依赖软件,libabigail在生成ABI特征文件的时候,需要通过elfutils读取二进制库内的DWARF调试数据。
29
30## OpenHarmony如何集成elfutils
31
32libabigail的编译依赖了elfutils,elfutils被集成到libabigail工具中。
33
34### 1.elfutils的编译
35
36elfutils的编译入口在其根目录下的BUILD.gn中。简单示意如下:
37
38```makefile
39# Build libelf
40ohos_static_library("libelf_static") {
41  configs = [ ":elfutils_defaults" ]
42
43  sources = sources_libelf
44  include_dirs = [
45    "//third_party/elfutils",
46    "//third_party/elfutils/lib",
47    "//third_party/elfutils/libelf",
48  ]
49  deps = [ "//third_party/zlib:libz" ]
50
51  subsystem_name = "thirdparty"
52  part_name = "elfutils"
53}
54
55# Build libdw
56ohos_static_library("libdw_static") {
57  configs = [ ":elfutils_defaults" ]
58
59  sources = sources_backends
60  sources += sources_libcpu
61  sources += sources_libdw
62  sources += sources_libdwelf
63  sources += sources_libdwfl
64  sources += sources_libebl
65
66  include_dirs = [
67    "//third_party/elfutils",
68    "//third_party/elfutils/lib",
69    "//third_party/elfutils/libasm",
70    "//third_party/elfutils/libelf",
71    "//third_party/elfutils/libcpu",
72    "//third_party/elfutils/libdw",
73    "//third_party/elfutils/libdwelf",
74    "//third_party/elfutils/libdwfl",
75    "//third_party/elfutils/libebl",
76  ]
77  deps = [ ":libelf_static" ]
78
79  subsystem_name = "thirdparty"
80  part_name = "elfutils"
81}
82
83```
84
85### 2.使用elfutils
86
87libabigail的编译依赖了elfutils。简单示意如下:
88
89```makefile
90ohos_static_library("libabigail_static") {
91  configs = [ "//third_party/libabigail:libabigail_defaults" ]
92
93  sources = [
94    ......
95  ]
96
97  include_dirs = [
98    ......
99  ]
100
101  external_deps = [
102    "//third_party/elfutils:libdw_static",
103  ]
104
105  subsystem_name = "thirdparty"
106  part_name = "libabigail"
107}
108```
109## elfutils相关内容
110
111[elfutils官网](https://sourceware.org/elfutils/)
112
113## License
114
115- `LGPL V3.0`
116
117
118- `GPL V2.0`
119
120
121- `GPL V3.0`
122
123## 风险提示
124
125**<u>‍elfutils是LGPLV3和GPLV3协议类型的三方开源软件,请谨慎使用,使用时须履行相应的开源义务。</u>**
126