6 Commits

Author SHA256 Message Date
064af52360 Accepting request 1310436 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1310436
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdwarf?expand=0&rev=39
2025-10-10 15:10:16 +00:00
977e84f433 - Update to version 2.2.0
No change in API in this release.
  * Added functions dwarf_lvn_name_direct() dwarf_lvn_name()
    dwarf_lvn_table_entry() to allow complete reading of
    DWARF6 DW_AT_language_version attributes.
  * Fixed issues reading corrupted (fuzzed) Apple Mach-o
    object files: now the code immediately returns an error
    instead of seeming stuck.
  * Fixed issues building with gcc option -std=c99 and the like.
  * Corrected a bug reading line table data that used forms
    similar to DWARF5 DW_FORM_strx.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/libdwarf?expand=0&rev=74
2025-10-10 05:34:06 +00:00
33720f94d5 Accepting request 1306506 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/1306506
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdwarf?expand=0&rev=38
2025-09-22 14:41:06 +00:00
f1ee3d5b01 - Update to version 2.1.0
* Removed heuristic checs for decompression reasonableness as
    they failed on some real object files.
  * Corrected handling and reporting of the DWARF6 attributes
    DW_AT_language_name and DW_AT_language_version.
  * An object with DWARF and GNU debuglink data and nothing else
    is now correctly accepted and reported.
- Update to version 2.0.0
  * Fixed a longstanding bug in configure.ac which began to cause
    builds to fail with recent autoconf.
  * Updated the error report (for zlib, zstd) when decompression
    exceeds a heuristic limit.
- Update to version 0.12
  * Improved the code in dwarfdump checking for valid address
    ranges (-k options).
  * Added the capability of using mmap instead of malloc in
    reading section data and functions allowing reporting on
    section malloc/mmap.
  * Now detects duplicated attributes and generates an error and
    provides a way to suppress the detection (for cases where one
    needs to analyze an object that was created with a broken
    compiler).
- Add patch:
  * libdwarf-both.patch
- Use meson instead of autotools
- Build dwarfgen
- Run testsuite
- Use %ldconfig_scriptlets macro

OBS-URL: https://build.opensuse.org/package/show/devel:tools/libdwarf?expand=0&rev=72
2025-09-22 12:02:17 +00:00
d69b3d93e7 Accepting request 1265497 from devel:tools
- update to 0.11.1:
  * Updated document date to today.
  * Each file has 1 to 3 trivial casts added and all
    involve things whose known range ensures
    the change is ok (boolean, address-size, and other known
    things)..
  * Removing trailing whitespace and fixing a couple
    indent mistakes.
  * Now checks and reports on all DIE references, meaning
    the DWARF reference class.
  * Now uses a macro for 0x%08llx clarifying printf on
    Dwarf_Unsigned.
  * Also removes an accidental trailing space in printed
    output.
  * In one place in code added yesterday an explicit dealloc
    of a Dwarf_Error was omitted. Found by the usual
    export NLIZE=y export SUPPRESSDEALLOCTREE=y
    regressiontest.
  * The code refactoed to print attributes:
    DW_AT_specification:
    DW_AT_abstract_origin:
    DW_AT_type:
    is now in place and this commit
    deletes the lines extracted to the new source file.
  * build: fix arguments order in calloc calls (#258)
  * Initial addition of ossfuzz 70753 and ossfuzz 70763

OBS-URL: https://build.opensuse.org/request/show/1265497
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdwarf?expand=0&rev=37
2025-03-31 09:43:13 +00:00
cb72d6521f - update to 0.11.1:
* Updated document date to today.
  * Each file has 1 to 3 trivial casts added and all
    involve things whose known range ensures
    the change is ok (boolean, address-size, and other known
    things)..
  * Removing trailing whitespace and fixing a couple
    indent mistakes.
  * Now checks and reports on all DIE references, meaning
    the DWARF reference class.
  * Now uses a macro for 0x%08llx clarifying printf on
    Dwarf_Unsigned.
  * Also removes an accidental trailing space in printed
    output.
  * In one place in code added yesterday an explicit dealloc
    of a Dwarf_Error was omitted. Found by the usual
    export NLIZE=y export SUPPRESSDEALLOCTREE=y
    regressiontest.
  * The code refactoed to print attributes:
    DW_AT_specification:
    DW_AT_abstract_origin:
    DW_AT_type:
    is now in place and this commit
    deletes the lines extracted to the new source file.
  * build: fix arguments order in calloc calls (#258)
  * Initial addition of ossfuzz 70753 and ossfuzz 70763

OBS-URL: https://build.opensuse.org/package/show/devel:tools/libdwarf?expand=0&rev=70
2025-03-30 08:34:50 +00:00
5 changed files with 161 additions and 24 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:846071fb220ac1952f9f15ebbac6c7831ef50d0369b772c07a8a8139a42e07d2
size 2727148

3
libdwarf-2.2.0.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54c0abbbeb4190bd1babb5d28574d2b20c2309343ec764cc7ca611e527ee4a42
size 3027540

55
libdwarf-both.patch Normal file
View File

@@ -0,0 +1,55 @@
From 51ea3e8455f1da6e3b6d5c34fb0d3ffdb0c155a2 Mon Sep 17 00:00:00 2001
From: Tom Hughes <tom@compton.nu>
Date: Tue, 25 Jun 2024 08:55:46 +0100
Subject: [PATCH] Make default-library=both work on linux
---
src/lib/libdwarf/meson.build | 8 ++++----
src/lib/libdwarfp/meson.build | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/lib/libdwarf/meson.build b/src/lib/libdwarf/meson.build
index a7570214..6a970024 100644
--- a/src/lib/libdwarf/meson.build
+++ b/src/lib/libdwarf/meson.build
@@ -121,12 +121,12 @@ else
libzstd_deps = dependency('',required: false)
endif
-if (lib_type == 'shared')
- compiler_flags = ['-DLIBDWARF_BUILD']
- compiler_flags_public = []
-else
+if (lib_type == 'static')
compiler_flags = ['-DLIBDWARF_STATIC']
compiler_flags_public = ['-DLIBDWARF_STATIC']
+else
+ compiler_flags = ['-DLIBDWARF_BUILD']
+ compiler_flags_public = []
endif
libdwarf_lib = library('dwarf', libdwarf_src,
diff --git a/src/lib/libdwarfp/meson.build b/src/lib/libdwarfp/meson.build
index a46c89eb..c6a1cf72 100644
--- a/src/lib/libdwarfp/meson.build
+++ b/src/lib/libdwarfp/meson.build
@@ -31,12 +31,12 @@ libdwarfp_src = [
]
libdwarf_dir = include_directories('../libdwarf')
-if (lib_type == 'shared')
- compiler_flags = ['-DLIBDWARF_BUILD']
- compiler_flags_public = []
-else
+if (lib_type == 'static')
compiler_flags = ['-DLIBDWARF_STATIC']
compiler_flags_public = ['-DLIBDWARF_STATIC']
+else
+ compiler_flags = ['-DLIBDWARF_BUILD']
+ compiler_flags_public = []
endif
--
2.49.0

View File

@@ -1,3 +1,80 @@
-------------------------------------------------------------------
Thu Oct 9 07:54:04 UTC 2025 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.2.0
No change in API in this release.
* Added functions dwarf_lvn_name_direct() dwarf_lvn_name()
dwarf_lvn_table_entry() to allow complete reading of
DWARF6 DW_AT_language_version attributes.
* Fixed issues reading corrupted (fuzzed) Apple Mach-o
object files: now the code immediately returns an error
instead of seeming stuck.
* Fixed issues building with gcc option -std=c99 and the like.
* Corrected a bug reading line table data that used forms
similar to DWARF5 DW_FORM_strx.
-------------------------------------------------------------------
Fri Sep 19 17:13:04 UTC 2025 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.1.0
* Removed heuristic checs for decompression reasonableness as
they failed on some real object files.
* Corrected handling and reporting of the DWARF6 attributes
DW_AT_language_name and DW_AT_language_version.
* An object with DWARF and GNU debuglink data and nothing else
is now correctly accepted and reported.
- Update to version 2.0.0
* Fixed a longstanding bug in configure.ac which began to cause
builds to fail with recent autoconf.
* Updated the error report (for zlib, zstd) when decompression
exceeds a heuristic limit.
- Update to version 0.12
* Improved the code in dwarfdump checking for valid address
ranges (-k options).
* Added the capability of using mmap instead of malloc in
reading section data and functions allowing reporting on
section malloc/mmap.
* Now detects duplicated attributes and generates an error and
provides a way to suppress the detection (for cases where one
needs to analyze an object that was created with a broken
compiler).
- Add patch:
* libdwarf-both.patch
- Use meson instead of autotools
- Build dwarfgen
- Run testsuite
- Use %ldconfig_scriptlets macro
-------------------------------------------------------------------
Sun Mar 30 08:31:16 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 0.11.1:
* Updated document date to today.
* Each file has 1 to 3 trivial casts added and all
involve things whose known range ensures
the change is ok (boolean, address-size, and other known
things)..
* Removing trailing whitespace and fixing a couple
indent mistakes.
* Now checks and reports on all DIE references, meaning
the DWARF reference class.
* Now uses a macro for 0x%08llx clarifying printf on
Dwarf_Unsigned.
* Also removes an accidental trailing space in printed
output.
* In one place in code added yesterday an explicit dealloc
of a Dwarf_Error was omitted. Found by the usual
export NLIZE=y export SUPPRESSDEALLOCTREE=y
regressiontest.
* The code refactoed to print attributes:
DW_AT_specification:
DW_AT_abstract_origin:
DW_AT_type:
is now in place and this commit
deletes the lines extracted to the new source file.
* build: fix arguments order in calloc calls (#258)
* Initial addition of ossfuzz 70753 and ossfuzz 70763
-------------------------------------------------------------------
Sun Aug 18 13:03:01 UTC 2024 - Dirk Müller <dmueller@suse.com>
@@ -727,5 +804,3 @@ Sat Jul 21 17:23:18 CEST 2007 - bwalle@suse.de
Mon Jun 4 17:15:41 CEST 2007 - bwalle@suse.de
- initial package
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package libdwarf
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,19 @@
Name: libdwarf
Version: 0.11.0
Version: 2.2.0
Release: 0
Summary: Access DWARF debugging information
License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://prevanders.net/dwarf.html
Source: https://github.com/davea42/libdwarf-code/releases/download/v%{version}/libdwarf-%{version}.tar.xz
Patch0: https://src.fedoraproject.org/rpms/libdwarf/raw/rawhide/f/libdwarf-both.patch
BuildRequires: binutils-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libelf-devel
BuildRequires: meson
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(zlib)
@@ -33,13 +37,13 @@ BuildRequires: pkgconfig(zlib)
libdwarf is a library of functions to provide read/write DWARF
debugging records.
%package -n libdwarf0
%package -n libdwarf2
Summary: Library to access DWARF information in object files
License: LGPL-2.1-or-later
Group: System/Libraries
Conflicts: libdwarf1
%description -n libdwarf0
%description -n libdwarf2
Library of functions to provide creation of DWARF debugging
information records, DWARF line number information, DWARF address
range and pubnames information, weak names information, and DWARF
@@ -49,7 +53,7 @@ frame description information.
Summary: Development files for libdwarf
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: libdwarf0 = %{version}
Requires: libdwarf2 = %{version}
Requires: libelf-devel
%description devel
@@ -85,6 +89,7 @@ Contains dwarfdump, a tool to access DWARF debug information.
Summary: Documentation for libdwarf
License: GPL-2.0-or-later
Group: Documentation/Other
BuildArch: noarch
%description doc
Documentation for libdwarf.
@@ -94,37 +99,39 @@ Documentation for libdwarf.
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}"
CFLAGS="$CFLAGS -fPIC" LDFLAGS="-pie" %configure --enable-shared
%make_build
%meson -Ddwarfgen=true --default-library=both
%meson_build
%install
%make_install
mkdir %{buildroot}%{_includedir}/libdwarf
cp -l %{buildroot}%{_includedir}/libdwarf-0/*.h %{buildroot}%{_includedir}/libdwarf
%meson_install
%post -n libdwarf0 -p /sbin/ldconfig
%postun -n libdwarf0 -p /sbin/ldconfig
%check
%meson_test
%files -n libdwarf0
%ldconfig_scriptlets -n libdwarf2
%files -n libdwarf2
%license src/lib/libdwarf/LIBDWARFCOPYRIGHT src/lib/libdwarf/LGPL.txt
%{_libdir}/libdwarf.so.0*
%{_libdir}/libdwarf.so.2*
%{_libdir}/libdwarfp.so.2*
%files devel
%{_libdir}/libdwarf.la
%{_includedir}/libdwarf-2
%{_libdir}/libdwarf.so
%{_libdir}/libdwarfp.so
%{_libdir}/pkgconfig/libdwarf.pc
%{_includedir}/libdwarf
%{_includedir}/libdwarf-0
%files devel-static
%{_libdir}/libdwarf.a
%{_libdir}/libdwarfp.a
%files tools
%license src/bin/dwarfdump/GPL.txt
%doc src/bin/dwarfdump/README
%{_bindir}/dwarfdump
%{_mandir}/man1/dwarfdump*
%{_bindir}/dwarfgen
%{_mandir}/man1/dwarfdump.1%{?ext_man}
%{_mandir}/man1/dwarfgen.1%{?ext_man}
%dir %{_datadir}/dwarfdump
%{_datadir}/dwarfdump/dwarfdump.conf