File libdwarf.spec of Package libdwarf
#
# spec file for package libdwarf (Version 20080818)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: libdwarf
Url: http://reality.sgiweb.org/davea/dwarf.html
Summary: Documentation for libdwarf
Version: 20080818
Release: 11
License: GPL v2 or later
Group: System/Libraries
Source: libdwarf-%{version}.tar.bz2
Patch0: libdwarf-relocation-support.patch
Patch1: libdwarf-dwarf3-dw_attributes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: binutils-devel libelf-devel
%description
Documentation for libdwarf.
Authors:
--------
David Anderson <davea42@earthlink.net>
%package devel
Summary: Static libraries of libdwarf
Group: System/Libraries
AutoReqProv: on
PreReq: %install_info_prereq
License: LGPL v2.1 or later
Requires: %{name} = %{version}
%description devel
Contains the static libraries and header files of libdwarf.
Libdwarf is a 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 frame description information.
Authors:
--------
David Anderson <davea42@earthlink.net>
%package tools
Summary: Access DWARF debugging information
Group: System/Libraries
AutoReqProv: on
PreReq: %install_info_prereq
License: LGPL v2.1 or later
%description tools
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 frame
description information.
Authors:
--------
David Anderson <davea42@earthlink.net>
%package doc
License: GPL v2 or later
Summary: DWARF-related tools
Group: System/Libraries
AutoReqProv: on
PreReq: %install_info_prereq
%description doc
Contains dwarfdump, a tool to access DWARF debug information.
Authors:
--------
David Anderson <davea42@earthlink.net>
%prep
%setup -q -n dwarf-%{version}
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
## libdwarf
cd libdwarf
CFLAGS="$CFLAGS -fPIC" %configure --enable-shared
make
cd -
## dwarfdump
cd dwarfdump
%configure
# LD_LIBRARY_PATH required since libdwarf.so and libdwarf.a
# are available - and tag_tree_build get linked against
# shared library. This workaround avoids patching of dwarfdump
# Makefile
# - dgollub (20081001)
LD_LIBRARY_PATH="../libdwarf" make
%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_includedir}/libdwarf
install -m 0644 libdwarf/libdwarf.a %{buildroot}%{_libdir}
install -m 0644 libdwarf/libdwarf.so* %{buildroot}%{_libdir}
install -m 0755 dwarfdump/dwarfdump %{buildroot}%{_bindir}
install -m 0644 libdwarf/libdwarf.h %{buildroot}%{_includedir}/libdwarf
install -m 0644 libdwarf/dwarf.h %{buildroot}%{_includedir}/libdwarf
%clean
rm -rf %{buildroot}
%post -n libdwarf -p /sbin/ldconfig
%postun -n libdwarf -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libdwarf.*so
%files devel
%defattr(-,root,root)
%{_libdir}/libdwarf.a
%{_includedir}/libdwarf
%files tools
%defattr(-,root,root)
%{_bindir}/dwarfdump
%doc ./dwarfdump/README
%files doc
%defattr(-,root,root)
%doc libdwarf/*.pdf
%doc ./libdwarf/README
%changelog
* Wed Oct 08 2008 dgollub@suse.de
- added libdwarf-dwarf3-dw_attributes.patch:
Allow attribute DW_AT_const_value in dwarf_add_AT_targ_address_b().
GCC generates code which has DW_AT_const_value with DW_FORM_addr.
Additional DWARF3 enhancments:
- allow DW_AT_entry_pc in dwarf_add_AT_targ_address_b()
- allow DW_AT_call_column, DW_AT_call_file, DW_AT_call_line in
dwarf_add_AT_unsigned_const
* Wed Oct 01 2008 dgollub@suse.de
- added libdwarf-relocation-support.patch:
initial ELF relocation support for libdwarf
* Wed Oct 01 2008 dgollub@suse.de
- removed dwarfextract from libdwarf-tools package
(got split into seperated package: dwarfextract)
- reenabled static build of libdwarf
* Sat Aug 23 2008 bwalle@suse.de
- update to 20080818
Minor improvements: dwarfdump print_reloc.c referred to
sym_data_entry_count in one place where sym_data_64_entry_count
should have been tested. DW_DLA_PUBTYPE_CONTEXT was a typo,
DW_DLE_PUBTYPE_CONTEXT was intended. Fixed indentation and
removed some tabs in favor of spaces (in five files). A couple
files had a couple lines with CR-LF line endings, the CR is now
gone. Corrected minor typographical errors in libdwarf2p.1.mm and
libdwarf2.1.mm and regenerated the pdfs.
* Tue Aug 12 2008 bwalle@suse.de
- update dwarfextract: fold dwarf-dwarfextract4.patch into
(from LKCD CVS) libdwarf-add-dwarfextract
* Tue Jun 17 2008 bwalle@suse.de
- update to 20080615
fixed wrong directory name in tarball (20060813 -> 20080815)
* Mon Jun 16 2008 bwalle@suse.de
- update to 20080613
Removed __SGI_FAST_LIBELF code, no one could use it anyway.
Fixed an off-by-one in dwarfdump which could reference off the
end of an array in a specfic circumstance and verify string table
index refers to inside the table when printing relocations.
Corrected return code from libdwarf when there is no dwarf
information. Thanks to Carlos Alberto Enciso for noticing the
bugs. Fixed indentation and removed some tabs in favor of
spaces (in a few files).
* Wed Jun 11 2008 bwalle@suse.de
- update to 20080125
In the producer library code dwarf_die_link() is now O(1) where
it was O(N) before. Thanks to Daniel Gollub for finding this
performance improvement. dwarf_die_link() now back-links siblings
(in its internal lists) correctly. The back link bug had no
(known) effect on dwarf generated by libdwarf.
- update to 20080208
Due to a typo, calling _dwarf_fde_section_offset() (a interface
which is still supported) would lead to an infinite loop in
libdwarf-20071209 and libdwarf-20080125. The libdwarf producer
forms code now allows more of the newer attributes (so is more
complete). Alloca is no longer used anywhere (it was really only
used one place). The libdwarf producer code controlling the
offset-size is more sensible: standard DWARF (32 bit offsets) is
the default, use configure --enable-dwarf-format-sgi-irix to get
IRIX 64bit offsets. See the libdwarf README and libdwarf2p.1.pdf
for details. Thanks to Carlos Alberto Enciso and Melanie Zumwalde
for noticing some of these errors.
- update to 20080228
This changes the libdwarf-internal implementation of reading libelf
so that the reader is not directly tied to libelf or even elf.
Meaning a libdwarf can be built that reads other object file types
or that uses some library other than libelf to do the reading
(subject only to simple constraints, see libdwarf.h). Thanks to
Josh Fuhs for designing and implementing the object-file-reader
revisions.
- update to 20080409
A giant a.out exposed an inflexible (slow) handling of
abbreviations in libdwarf as well as showing that one (internal)
field was too small to accommodate over 64K abbreviations in one
compilation unit. The relevant hash table adapts now and the field
is 'large enough'. Added -H and -n options to dwarfdump. Added a
dwarfdump -ka new check for correctness.
* Fri Jan 25 2008 dgollub@suse.de
- removed README.SUSE, which contained obsolate information about
shared library and versioning.
- update to 20080125
o producer interface:
dwarf_die_link() is now O(1) where it was O(N) before.
* Tue Dec 11 2007 dgollub@suse.de
- building shared lib (instead of static)
- added LD_LIBRARY_PATH to dwarfdump Makefile, since it runs
something within the build which is linked against libdwarf.
- update to 20071209
o Renamed 4 functions so they are now exported by libdwarf as dwarf_*:
dwarf_fde_section_offset(), dwarf_cie_section_offset(),
dwarf_print_lines(), and dwarf_ld_sort_lines() are the new names.
o The old _dwarf_* names are still supported in libdwarf.h but anyone
building a shared library could choose to export only dwarf_* names
and dwarfdump will now compile and link successfully with that shared
library.
o Added acceptance of .eh_frame S augmentation
o Updated config.guess config.sub to latest (2006-11-15)
o Added configure tests and some code in dwarf_incl.h and globals.h
to define _GNU_SOURCE so that it will all compile with recent libelf.h
use of off64_t (yet still compile with earlier libelf.h)
- updated to 20071016
o dwarf_siblingof() could try to access a byte past the
end of an Elf section leading to a coredump.
o The dwarf macro reading code could (in the DWARF_SIMPLE_MALLOC
case only) allocate and free memory inconsistently leading to
malloc arena corruption.
(updated to 20071015)
o The special build macro DWARF_SIMPLE_MALLOC was incorrectly
implemented (now fixed): it could lead builds employing that
macro to coredump in libdwarf. Now (just before exit) dwarfdump
free()s some space it previously left mallocd.
(updated to 20070904)
o Added qualifier for DWARF4 DW_AT_high_pc where applicable in
dwarfdump output.
o Added documentation of new producer functions in libdwarf.
o Misc: Updated FSF address everywhere. Deleted 2 files which
were never used.
* Sat Jul 21 2007 bwalle@suse.de
- add 'dwarfextract' from lkcdutils to libdwarf-tools since
we only distribute 'lcrash' from lkcdutils now
* Sat Jul 21 2007 bwalle@suse.de
- updated to 20070703
o Adding new libdwarf function dwarf_get_loclist_entry() to
extract CFA val_expression bytes usefully.
o dwarfdump now uses that info to print those expression bytes
with -v
o DW_CFA_val_expression was handled wrong in libdwarf leading
eventually to an invalid register number reading a GNU
.eh_frame section (dwarfdump reported an error).
* Mon Jun 04 2007 bwalle@suse.de
- initial package