Mike Frysinger [Tue, 26 Jun 2012 16:07:44 +0000 (12:07 -0400)]
tests: only compile test programs when running test
The test binaries are only needed by make check, so change the PROGRAMS
category from noinst_ to check_ to speed up default `make && make install`.
If people want to run the tests, then the utilities will be compiled
automatically when they run `make check`, so the normal workflow should
be unchanged.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Tue, 5 Jun 2012 15:15:16 +0000 (17:15 +0200)]
Update name, license and contributor policy.
* Change name from "Red Hat elfutils" to "elfutils".
* Update license of standalone tools and test from GPLv2 to GPLv3+.
* Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+.
* Add Developer Certificate of Origin based contributor policy.
top-level:
- COPYING: Upgraded from GPLv2 to GPLv3.
- CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files.
- NEWS: Added note about new contribution and license policy.
- Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST.
- configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'.
- All files updated to GPLv2/LGPLv3+. Except some very small files
(<5 lines) which didn't have any headers at all before, the linker
.maps files and the libcpu/defs files which only contain data and
libelf/elf.h which comes from glibc and is under LGPLv2+.
config:
- elfutils.spec.in: Add new License: headers and new %doc files.
- Update all license headers to GPLv2/LGPLv3+ for files used by libs.
src, tests:
- All files updated to GPLv3+. Except for the test bz2 data files, the
linker maps and script files and some very small files (<5 lines)
that don't have any headers.
Signed-off-by: Richard Fontana <rfontana@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
Mark Wielaard [Mon, 2 Apr 2012 15:11:25 +0000 (17:11 +0200)]
elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET.
readelf -d doesn't work if a SHT_NOBITS section is right before the actual
.dynamic section at the same offset. elflint also fails on such binaries.
So skip SHT_NOBITS sections at the same offset in [g]elf[32|64]_offscn().
Tom Tromey [Wed, 21 Mar 2012 14:54:32 +0000 (08:54 -0600)]
Fix bug using dwarf_next_unit to iterate over .debug_types
* libdw_findcu.c (findcu_cb): Move earlier.
(__libdw_intern_next_unit): Add new CU to search tree here...
(__libdw_findcu): ... not here.
* typeiter.c: New file.
* run-typeiter.sh: New file.
* testfile59.bz2: New file.
* Makefile.am (noinst_PROGRAMS): Add typeiter.
(TESTS): Add run-typeiter.sh.
(EXTRA_DIST): Add run-typeiter.sh, testfile59.bz2.
(typeiter_LDADD): New variable.
If you call dwarf_next_unit to iterate over .debug_types, then call
dwarf_offdie_types, you can see a failure if some earlier call
happened to call __libdw_intern_next_unit via dwarf_formref_die.
What happens is that __libdw_intern_next_unit updates the Dwarf's
next_tu_offset, but does not add the TU to the TU search tree. So,
the call to dwarf_offdie_types does not find the TU in the tree, and
will not search any more, causing a failure.
This fix changes __libdw_intern_next_unit to add the TU to the search
tree, rather than relying on __libdw_findcu to do it.
Mark Wielaard [Mon, 31 Oct 2011 22:17:06 +0000 (23:17 +0100)]
Use index of first global symbol to speed up dwfl_module_addrsym search.
Cache the index of the first global symbol in the module's symbol table,
or -1 when unknown. All symbols with local binding come first in the
symbol table before the global symbols. Use this information to speed
up dwfl_module_addrsym search.
Ulrich Drepper [Mon, 3 Oct 2011 11:23:07 +0000 (07:23 -0400)]
Improve nm output for BSD and POSIX format
The binutils version showed more information since it distinguished
unique symbols, symbols in read-only and bss sections. The format
is now the same. In addition handle TLS symbols correctly but
differently from binutils nm since the latter drops information.
Instead use a @ suffix to indicate TLS similar to * to indicate
weak.
Mark Wielaard [Tue, 26 Apr 2011 15:15:28 +0000 (17:15 +0200)]
libdw: Sanity check end of section against cu_data () of die->cu.
A Dwarf_CU can come from either the debug_info compile unit or a
debug_type type unit section. Use the correct one for sanity checking
whether we have a truncated section.
Mark Wielaard [Mon, 11 Apr 2011 15:24:16 +0000 (17:24 +0200)]
Fix libdwfl compile issue in case none of the compression libraries are there.
* linux-kernel-modules.c (vmlinux_suffixes): Guard definition
by check for zlib, bzlib or lzma defines to check it isn't empty.
(try_kernel_name): Use same guard for use of vmlinux_suffixes.
Mark Wielaard [Tue, 22 Mar 2011 22:03:31 +0000 (23:03 +0100)]
Add support for call_site and entry_value to dwarf.h and readelf.
New tags DW_TAG_GNU_call_site and DW_TAG_GNU_call_site_parameter.
New attributes DW_AT_GNU_call_site_value,
DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites,
and DW_AT_GNU_all_source_call_sites.
New operation DW_OP_GNU_entry_value.