pahole: Prep 1.20

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-02-02 10:22:50 -03:00
parent 7943374ac5
commit 0d415f68c4
5 changed files with 122 additions and 5 deletions

View File

@ -33,9 +33,9 @@ set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror -ggdb -O0")
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2")
# Just for grepping, DWARVES_VERSION isn't used anywhere anymore
# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.19")
# add_definitions(-D_GNU_SOURCE -DDWARVES_VERSION="v1.20")
add_definitions(-D_GNU_SOURCE -DDWARVES_MAJOR_VERSION=1)
add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=19)
add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=20)
find_package(DWARF REQUIRED)
find_package(ZLIB REQUIRED)

View File

@ -50,6 +50,7 @@ changes-v1.16
changes-v1.17
changes-v1.18
changes-v1.19
changes-v1.20
COPYING
NEWS
README

30
NEWS
View File

@ -1,3 +1,33 @@
v1.20:
Tue Feb 2 2021
8d6f06f053a06829 (HEAD -> master, seventh/master, quaco/master, origin/master, origin/HEAD) dwarf_loader: Add conditional DW_FORM_implicit_const definition for older systems
66d12e4790b7c5e5 dtagnames: Stop using the deprecated mallinfo() function
1279e439b622aeb5 cmake: Bump minimum required version to 2.8.12 as per upstream support warning
b1eaf0da6d1f72b2 dwarves: Make enum prefix search more robust
d783117162c0212d dwarf_loader: Handle DWARF5 DW_TAG_call_site like DW_TAG_GNU_call_site
3ff98a6396e91d0a dwarf_loader: Support DW_FORM_implicit_const in __attr_offset()
b91b19840b0062b8 dwarf_loader: Support DW_AT_data_bit_offset
c692e8ac5ccbab99 dwarf_loader: Optimize a bit the reading of DW_AT_data_member_location
65917b24942ce620 dwarf_loader: Fix typo
77205a119c85e396 dwarf_loader: Introduce __attr_offset() to reuse call to dwarf_attr()
8ec231f6b0c8aaef dwarf_loader: Support DW_FORM_implicit_const in attr_numeric()
7453895e01edb535 btf_encoder: Improve ELF error reporting
1bb49897dd2b65b0 bpf_encoder: Translate SHN_XINDEX in symbol's st_shndx values
3f8aad340bf1a188 elf_symtab: Handle SHN_XINDEX index in elf_section_by_name()
e32b9800e650a6eb btf_encoder: Add extra checks for symbol names
82749180b23d3c9c libbpf: allow to use packaged version
452dbcf35f1a7bf9 btf_encoder: Improve error-handling around objcopy
cf381f9a3822d68b btf_encoder: Fix handling of restrict qualifier
b688e35970600c15 btf_encoder: fix skipping per-CPU variables at offset 0
8c009d6ce762dfc9 btf_encoder: fix BTF variable generation for kernel modules
b94e97e015a94e6b dwarves: Fix compilation on 32-bit architectures
17df51c700248f02 btf_encoder: Detect kernel module ftrace addresses
06ca639505fc56c6 btf_encoder: Use address size based on ELF's class
aff60970d16b909e btf_encoder: Factor filter_functions function
1e6a3fed6e52d365 rpm: Fix changelog date
v1.19:
Fri Nov 20 2020

66
changes-v1.20 Normal file
View File

@ -0,0 +1,66 @@
BTF encoder:
- Improve ELF error reporting using elf_errmsg(elf_errno()).
- Improve objcopy error handling.
- Fix handling of 'restrict' qualifier, that was being treated as a 'const'.
- Support SHN_XINDEX in st_shndx symbol indexes, to handle ELF objects with
more than 65534 sections, for instance, which happens with kernels built
with 'KCFLAGS="-ffunction-sections -fdata-sections", Other cases may
include when using FG-ASLR, LTO.
- Cope with functions without a name, as seen sometimes when building kernel
images with some versions of clang, when a SEGFAULT was taking place.
- Fix BTF variable generation for kernel modules, not skipping variables at
offset zero.
- Fix address size to match what is in the ELF file being processed, to fix using
a 64-bit pahole binary to generate BTF for a 32-bit vmlinux image.
- Use kernel module ftrace addresses when finding which functions to encode,
which increases the number of functions encoded.
libbpf:
- Allow use of packaged version, for distros wanting to dynamically link with
the system's libbpf package instead of using the libbpf git submodule shipped
in pahole's source code.
DWARF loader:
- Support DW_AT_data_bit_offset
This appeared in DWARF4 but is supported only in gcc's -gdwarf-5,
support it in a way that makes the output be the same for both cases.
$ gcc -gdwarf-5 -c examples/dwarf5/bf.c
$ pahole bf.o
struct pea {
long int a:1; /* 0: 0 8 */
long int b:1; /* 0: 1 8 */
long int c:1; /* 0: 2 8 */
/* XXX 29 bits hole, try to pack */
/* Bitfield combined with next fields */
int after_bitfield; /* 4 4 */
/* size: 8, cachelines: 1, members: 4 */
/* sum members: 4 */
/* sum bitfield members: 3 bits, bit holes: 1, sum bit holes: 29 bits */
/* last cacheline: 8 bytes */
};
- DW_FORM_implicit_const in attr_numeric() and attr_offset()
- Support DW_TAG_GNU_call_site, its the standardized rename of the previously supported
DW_TAG_GNU_call_site.
build:
- Fix compilation on 32-bit architectures.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

View File

@ -2,7 +2,7 @@
%define libver 1
Name: dwarves
Version: 1.19
Version: 1.20
Release: 1%{?dist}
License: GPLv2
Summary: Debugging Information Manipulation Tools (pahole & friends)
@ -10,7 +10,7 @@ URL: http://acmel.wordpress.com
Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz
Requires: %{libname}%{libver} = %{version}-%{release}
BuildRequires: gcc
BuildRequires: cmake
BuildRequires: cmake >= 2.8.12
BuildRequires: zlib-devel
BuildRequires: elfutils-devel >= 0.130
@ -79,7 +79,7 @@ rm -Rf %{buildroot}
%files
%doc README.ctracer
%doc README.btf
%doc changes-v1.19
%doc changes-v1.20
%doc NEWS
%{_bindir}/btfdiff
%{_bindir}/codiff
@ -134,6 +134,26 @@ rm -Rf %{buildroot}
%{_libdir}/%{libname}_reorganize.so
%changelog
* Tue Feb 2 2021 Arnaldo Carvalho de Melo <acme@redhat.com> - 1.20-1
- New release: v1.20
- btf_encoder:
- Improve ELF error reporting using elf_errmsg(elf_errno())
- Improve objcopy error handling.
- Fix handling of 'restrict' qualifier, that was being treated as a 'const'.
- Support SHN_XINDEX in st_shndx symbol indexes
- Cope with functions without a name
- Fix BTF variable generation for kernel modules
- Fix address size to match what is in the ELF file being processed.
- Use kernel module ftrace addresses when finding which functions to encode.
- libbpf:
- Allow use of packaged version.
- dwarf_loader:
- Support DW_AT_data_bit_offset
- DW_FORM_implicit_const in attr_numeric() and attr_offset()
- Support DW_TAG_GNU_call_site, standardized rename of DW_TAG_GNU_call_site.
- build:
- Fix compilation on 32-bit architectures.
* Fri Nov 20 2020 Arnaldo Carvalho de Melo <acme@redhat.com> - 1.19-1
- New release: 1.19
- Split BTF