Name Date Size

..25-Oct-20244 KiB

.gitignoreH A D25-Oct-2024274

AUTHORSH A D25-Oct-20241.5 KiB

AUTHORS.shH A D25-Oct-2024358

backends/H25-Oct-20244 KiB

BUILD.gnH A D25-Oct-20242 KiB

bundle.jsonH A D25-Oct-20241.3 KiB

ChangeLogH A D25-Oct-202429 KiB

config/H25-Oct-20244 KiB

config.hH A D25-Oct-20245.4 KiB

configure.acH A D25-Oct-202433 KiB

CONTRIBUTINGH A D25-Oct-20244.4 KiB

COPYINGH A D25-Oct-202434.3 KiB

COPYING-GPLV2H A D25-Oct-202417.7 KiB

COPYING-LGPLV3H A D25-Oct-20247.5 KiB

debuginfod/H25-Oct-20244 KiB

doc/H25-Oct-20244 KiB

elfutils_config.gniH A D25-Oct-202425 KiB

GPG-KEYH A D25-Oct-20247 KiB

include/elfutils/H25-Oct-20244 KiB

lib/H25-Oct-20244 KiB

libasm/H25-Oct-20244 KiB

libcpu/H25-Oct-20244 KiB

libdw/H25-Oct-20244 KiB

libdwelf/H25-Oct-20244 KiB

libdwfl/H25-Oct-20244 KiB

libebl/H25-Oct-20244 KiB

libelf/H25-Oct-20244 KiB

m4/H25-Oct-20244 KiB

Makefile.amH A D25-Oct-20243.1 KiB

NEWSH A D25-Oct-202450.7 KiB

NOTESH A D25-Oct-20243 KiB

OAT.xmlH A D25-Oct-20245.6 KiB

po/H25-Oct-20244 KiB

READMEH A D25-Oct-20241.1 KiB

README.OpenSourceH A D25-Oct-2024475

README_OpenHarmony.mdH A D25-Oct-20242.9 KiB

src/H25-Oct-20244 KiB

tests/H25-Oct-202436 KiB

THANKSH A D25-Oct-2024193

TODOH A D25-Oct-20245.3 KiB

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

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.188",
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