]> git.ipfire.org Git - thirdparty/elfutils.git/log
thirdparty/elfutils.git
13 years agoUpdate dwarf branch name, license and contributor policy. dwarf
Mark Wielaard [Wed, 6 Jun 2012 10:26:07 +0000 (12:26 +0200)] 
Update dwarf branch 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.

dwarflint:

- All files updated to GPLv3+.

libdw/c++:

- All files updated to GPLv2/LGPLv3+.

src:

- All files updated to GPLv3+. Except dwarf-opcodes.h, dwarfstrings.c
  and dwarfstrings.h, which were meant as library files and have been
  updated to GPLv2/LGPLv3+.

tests:

- All files updated to GPLv3+. Except for the test bz2 data files.

Signed-off-by: Richard Fontana <rfontana@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
13 years agoMerge branch 'master' into dwarf
Mark Wielaard [Wed, 6 Jun 2012 08:57:48 +0000 (10:57 +0200)] 
Merge branch 'master' into dwarf

Signed-off-by: Richard Fontana <rfontana@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
13 years agoUpdate name, license and contributor policy.
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'.

backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf:

- 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>
13 years agoRemove .mtn-ignore and .cvsignore files.
Mark Wielaard [Tue, 5 Jun 2012 12:55:29 +0000 (14:55 +0200)] 
Remove .mtn-ignore and .cvsignore files.

We use .gitignore these days.

13 years agoRemove unused (generated) src/ylwrap file.
Mark Wielaard [Tue, 5 Jun 2012 12:42:38 +0000 (14:42 +0200)] 
Remove unused (generated) src/ylwrap file.

ylwrap is now placed in config through AC_CONFIG_AUX_DIR.
The checked in src copy of the file wasn't used.

13 years agoTESTS_ENVIRONMENT set LC_ALL and LANG to C.
Mark Wielaard [Fri, 11 May 2012 10:57:57 +0000 (12:57 +0200)] 
TESTS_ENVIRONMENT set LC_ALL and LANG to C.

Some tests rely on sort order and output of tools that might be localized.

Reported-by: Paweł Sikora <pluto@pld-linux.org>
13 years agoelflint: Allow zero sized sections at (filesz) end of segment.
Mark Wielaard [Wed, 9 May 2012 09:27:44 +0000 (11:27 +0200)] 
elflint: Allow zero sized sections at (filesz) end of segment.

13 years agotests/low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
Mark Wielaard [Mon, 7 May 2012 11:29:52 +0000 (13:29 +0200)] 
tests/low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.

GCC < 4.7 had a bug where no code CUs got a highpc == lowpc.
Allow that, because it is not the main purpose of this test.

13 years agodwarf_highpc: Handle DW_AT_high_pc being a constant offset from DW_AT_low_pc.
Mark Wielaard [Fri, 27 Apr 2012 11:00:50 +0000 (13:00 +0200)] 
dwarf_highpc: Handle DW_AT_high_pc being a constant offset from DW_AT_low_pc.

13 years agoRemoved old libdwarf test show-ciefde.
Mark Wielaard [Thu, 26 Apr 2012 10:24:33 +0000 (12:24 +0200)] 
Removed old libdwarf test show-ciefde.

13 years agoreadelf.c (print_ops): Add missing DW_OP_GNU operands.
Mark Wielaard [Tue, 24 Apr 2012 09:56:42 +0000 (11:56 +0200)] 
readelf.c (print_ops): Add missing DW_OP_GNU operands.

DW_OP_GNU_push_tls_address, DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.

13 years agoAdd new run-unstrip-n.sh test for RHBZ#805447 fixed in commit 210c2f.
Mark Wielaard [Mon, 2 Apr 2012 22:21:50 +0000 (00:21 +0200)] 
Add new run-unstrip-n.sh test for RHBZ#805447 fixed in commit 210c2f.

13 years agoelf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET.
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().

13 years agoelflint: Accept SHF_INFO_LINK for reloc sections.
Roland McGrath [Wed, 28 Mar 2012 22:01:49 +0000 (15:01 -0700)] 
elflint: Accept SHF_INFO_LINK for reloc sections.

13 years agoreadelf.c: Check debug section data before trying to print abbrev or str.
Mark Wielaard [Wed, 28 Mar 2012 09:20:36 +0000 (11:20 +0200)] 
readelf.c: Check debug section data before trying to print abbrev or str.

* readelf.c (print_debug_abbrev_section): Check there is Dwarf
section data.
(print_debug_str_section): Likewise.

13 years agoRHBZ#805447: Fix core file grokking for case of truncated .dynstr
Roland McGrath [Wed, 28 Mar 2012 17:22:35 +0000 (10:22 -0700)] 
RHBZ#805447: Fix core file grokking for case of truncated .dynstr

13 years agoDon't exclude sh_type >= SHT_NUM from stripping.
Roland McGrath [Thu, 22 Mar 2012 17:25:55 +0000 (10:25 -0700)] 
Don't exclude sh_type >= SHT_NUM from stripping.

13 years agoFix bug using dwarf_next_unit to iterate over .debug_types
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.

13 years agoreadelf.c (print_gdb_index_section): Accept version 6.
Mark Wielaard [Wed, 21 Mar 2012 15:05:31 +0000 (16:05 +0100)] 
readelf.c (print_gdb_index_section): Accept version 6.

No changes in the format.  Version 6 contains symbols for inlined
functions, older versions didn't.

13 years agoelf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
Mark Wielaard [Sun, 26 Feb 2012 12:14:32 +0000 (13:14 +0100)] 
elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.

Reported-by: Kurt Roeckx <kurt@roeckx.be>
13 years agolibcpu Makefile.am, move %_dis.h from CLEANFILES to MAINTAINERCLEANFILES.
Mark Wielaard [Fri, 24 Feb 2012 22:41:53 +0000 (23:41 +0100)] 
libcpu Makefile.am, move %_dis.h from CLEANFILES to MAINTAINERCLEANFILES.

13 years agorun-alldts.sh: testrun ./alldts.
Kurt Roeckx [Fri, 24 Feb 2012 22:40:32 +0000 (23:40 +0100)] 
run-alldts.sh: testrun ./alldts.

13 years agorun-alldts.sh: testrun ./alldts.
Kurt Roeckx [Fri, 24 Feb 2012 22:14:00 +0000 (23:14 +0100)] 
run-alldts.sh: testrun ./alldts.

13 years agoCOPYING: Fix address. Updated version from gnulib.
Mark Wielaard [Fri, 24 Feb 2012 09:56:30 +0000 (10:56 +0100)] 
COPYING: Fix address. Updated version from gnulib.

13 years agoPrepare 0.153 release. elfutils-0.153
Mark Wielaard [Thu, 23 Feb 2012 11:28:59 +0000 (12:28 +0100)] 
Prepare 0.153 release.

13 years agotest-subr.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.
Roland McGrath [Tue, 21 Feb 2012 20:51:36 +0000 (12:51 -0800)] 
test-subr.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.

13 years agotest-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.
Roland McGrath [Tue, 21 Feb 2012 19:12:46 +0000 (11:12 -0800)] 
test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH.

13 years agoHandle DW_FORM_sec_offset in dwarf_formudata.
Mark Wielaard [Tue, 31 Jan 2012 18:22:03 +0000 (19:22 +0100)] 
Handle DW_FORM_sec_offset in dwarf_formudata.

13 years agoCosmetic cleanups to NEWS.
Roland McGrath [Mon, 23 Jan 2012 18:34:17 +0000 (10:34 -0800)] 
Cosmetic cleanups to NEWS.

13 years agoAdd NEWS entries for libdwfl, readelf, strip and dwarf.h.
Mark Wielaard [Sun, 22 Jan 2012 18:28:20 +0000 (19:28 +0100)] 
Add NEWS entries for libdwfl, readelf, strip and dwarf.h.

13 years agoUpdate copyright year
Ulrich Drepper [Sat, 21 Jan 2012 23:19:24 +0000 (18:19 -0500)] 
Update copyright year

13 years agoColor code output of nm and objdump
Ulrich Drepper [Sat, 21 Jan 2012 23:14:39 +0000 (18:14 -0500)] 
Color code output of nm and objdump

13 years agoFix warning nit.
Roland McGrath [Fri, 20 Jan 2012 21:38:29 +0000 (13:38 -0800)] 
Fix warning nit.

13 years agoHandle --enable-deterministic-archives to make -D behavior default for ar and ranlib.
Roland McGrath [Fri, 20 Jan 2012 20:51:46 +0000 (12:51 -0800)] 
Handle --enable-deterministic-archives to make -D behavior default for ar and ranlib.

13 years agoar: Don't crash when given files but no command.
Roland McGrath [Fri, 20 Jan 2012 20:04:19 +0000 (12:04 -0800)] 
ar: Don't crash when given files but no command.

13 years agoGrok -U as inverse of -D in ar and ranlib.
Roland McGrath [Fri, 20 Jan 2012 19:43:36 +0000 (11:43 -0800)] 
Grok -U as inverse of -D in ar and ranlib.

13 years agoSupport -D in ranlib as in ar.
Roland McGrath [Fri, 20 Jan 2012 19:40:59 +0000 (11:40 -0800)] 
Support -D in ranlib as in ar.

13 years agoDon't set LD_LIBRARY_PATH explicitly for command run inside test case.
Roland McGrath [Wed, 18 Jan 2012 21:57:08 +0000 (13:57 -0800)] 
Don't set LD_LIBRARY_PATH explicitly for command run inside test case.

13 years agoFix .eh_frame decoding in the absence of any DWARF.
Roland McGrath [Tue, 20 Dec 2011 18:55:01 +0000 (10:55 -0800)] 
Fix .eh_frame decoding in the absence of any DWARF.

13 years agoFix elf_from_remote_memory for ELFCLASS64 case.
Roland McGrath [Fri, 2 Dec 2011 17:45:53 +0000 (09:45 -0800)] 
Fix elf_from_remote_memory for ELFCLASS64 case.

13 years agoar: Implement -D.
Roland McGrath [Sun, 6 Nov 2011 04:08:07 +0000 (21:08 -0700)] 
ar: Implement -D.

13 years agoar: Fix a return value check.
Roland McGrath [Sun, 6 Nov 2011 03:58:14 +0000 (20:58 -0700)] 
ar: Fix a return value check.

13 years agoUse index of first global symbol to speed up dwfl_module_addrsym search.
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.

13 years agodwfl_module_addrsym update sizeless_sym only if closer to desired addr.
Mark Wielaard [Mon, 31 Oct 2011 14:33:49 +0000 (15:33 +0100)] 
dwfl_module_addrsym update sizeless_sym only if closer to desired addr.

13 years agoRun gawk on config/known-dwarf.awk.
Mark Wielaard [Mon, 31 Oct 2011 14:01:50 +0000 (15:01 +0100)] 
Run gawk on config/known-dwarf.awk.

13 years agoMerge branch 'roland/maintainer-gendis'
Roland McGrath [Sun, 23 Oct 2011 20:54:53 +0000 (13:54 -0700)] 
Merge branch 'roland/maintainer-gendis'

13 years agoderelocate.c (cache_sections): Intern mod->reloc_info check.
Mark Wielaard [Thu, 20 Oct 2011 14:53:54 +0000 (16:53 +0200)] 
derelocate.c (cache_sections): Intern mod->reloc_info check.

13 years agoInclude *_dis.h headers in dist; generate them only for --enable-maintainer-mode.
Roland McGrath [Sun, 16 Oct 2011 16:23:00 +0000 (09:23 -0700)] 
Include *_dis.h headers in dist; generate them only for --enable-maintainer-mode.

13 years agoUse POSIX.2 shell features in eu_version calculation.
Roland McGrath [Sat, 8 Oct 2011 22:14:30 +0000 (15:14 -0700)] 
Use POSIX.2 shell features in eu_version calculation.

13 years agoFix use of AC_ARG_ENABLE to handle $enableval correctly.
Mike Frysinger [Sat, 8 Oct 2011 22:09:15 +0000 (15:09 -0700)] 
Fix use of AC_ARG_ENABLE to handle $enableval correctly.

13 years agoIgnore files generated by building in the source directory.
Roland McGrath [Sat, 8 Oct 2011 21:58:24 +0000 (14:58 -0700)] 
Ignore files generated by building in the source directory.

13 years agoreadelf.c: Assume the right size of an array
Marek Polacek [Tue, 4 Oct 2011 09:11:42 +0000 (05:11 -0400)] 
readelf.c: Assume the right size of an array

13 years agoMore CL
Ulrich Drepper [Mon, 3 Oct 2011 20:08:33 +0000 (16:08 -0400)] 
More CL

13 years agoFix nm output for sysv format
Ulrich Drepper [Mon, 3 Oct 2011 19:53:12 +0000 (15:53 -0400)] 
Fix nm output for sysv format

Undefined symbols need no address and siz printed.  Avoid the initial
entry which is no real symbol.  Avoid section symbols.

13 years agoImprove nm output for BSD and POSIX format
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.

13 years agoUpdate spec file for dependency on C++ library
Ulrich Drepper [Sun, 2 Oct 2011 12:49:57 +0000 (08:49 -0400)] 
Update spec file for dependency on C++ library

13 years agoAdd demangling support to nm
Ulrich Drepper [Sun, 2 Oct 2011 12:33:19 +0000 (08:33 -0400)] 
Add demangling support to nm

14 years ago * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
Mark Wielaard [Thu, 14 Jul 2011 10:59:26 +0000 (12:59 +0200)] 
    * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.

14 years agoreadelf: Grok -W/--wide for binutils compatibility.
Roland McGrath [Sat, 9 Jul 2011 12:33:37 +0000 (05:33 -0700)] 
readelf: Grok -W/--wide for binutils compatibility.

14 years agoWire up -u option handling in ar.
Roland McGrath [Sat, 9 Jul 2011 10:20:16 +0000 (03:20 -0700)] 
Wire up -u option handling in ar.

14 years agoClean up byte order handling in md5 and sha1 code.
Roland McGrath [Sat, 9 Jul 2011 10:17:24 +0000 (03:17 -0700)] 
Clean up byte order handling in md5 and sha1 code.

14 years agostrip.c (relocate): Make offset check overflow-proof.
Mark Wielaard [Mon, 30 May 2011 15:23:57 +0000 (17:23 +0200)] 
strip.c (relocate): Make offset check overflow-proof.

14 years agoAdd missing test wrappers to Makefile.am (EXTRA_DIST).
Mark Wielaard [Mon, 30 May 2011 13:46:32 +0000 (15:46 +0200)] 
Add missing test wrappers to Makefile.am (EXTRA_DIST).

14 years agostrip: --reloc-debug-sections, relocate against any debug section symbol.
Mark Wielaard [Tue, 24 May 2011 14:09:31 +0000 (16:09 +0200)] 
strip: --reloc-debug-sections, relocate against any debug section symbol.

14 years agoAdd hello_s390.ko testcase to run-strip-reloc.sh.
Mark Wielaard [Tue, 24 May 2011 12:30:40 +0000 (14:30 +0200)] 
Add hello_s390.ko testcase to run-strip-reloc.sh.

This new test PASSes, but looking at the size results will show
--reloc-debug-sections isn't making a huge difference for this case.

14 years agostrip: Add --reloc-debug-sections option.
Mark Wielaard [Mon, 16 May 2011 09:33:11 +0000 (11:33 +0200)] 
strip: Add --reloc-debug-sections option.

14 years agostrip: Handle SHT_GROUP sections better.
Mark Wielaard [Tue, 17 May 2011 10:20:01 +0000 (12:20 +0200)] 
strip: Handle SHT_GROUP sections better.

14 years agodwarf-opcodes.h add GNU_const_type/regval_type/deref_type/convert/reinterpret.
Jakub Jelinek [Tue, 17 May 2011 20:55:50 +0000 (22:55 +0200)] 
dwarf-opcodes.h add GNU_const_type/regval_type/deref_type/convert/reinterpret.

14 years agoMerge branch 'master' into dwarf
Mark Wielaard [Tue, 17 May 2011 20:23:47 +0000 (22:23 +0200)] 
Merge branch 'master' into dwarf

Conflicts:
src/readelf.c

14 years agoAdd DW_OP_GNU_const_type/regval_type/deref_type/convert/reinterpret.
Jakub Jelinek [Tue, 17 May 2011 15:00:14 +0000 (17:00 +0200)] 
Add DW_OP_GNU_const_type/regval_type/deref_type/convert/reinterpret.

14 years agodwarf_tag_string fixup GNU_call_site and GNU_call_site_parameter strings.
Mark Wielaard [Tue, 17 May 2011 13:34:02 +0000 (15:34 +0200)] 
dwarf_tag_string fixup GNU_call_site and GNU_call_site_parameter strings.

14 years agonm.c: Remove unused if/else and parameters.
Marek Polacek [Thu, 12 May 2011 10:08:21 +0000 (12:08 +0200)] 
nm.c: Remove unused if/else and parameters.

14 years agounstrip.c: Mark function as static.
Marek Polacek [Sat, 7 May 2011 17:26:20 +0000 (19:26 +0200)] 
unstrip.c: Mark function as static.

14 years agoMerge branch 'master' into dwarf
Mark Wielaard [Tue, 3 May 2011 09:45:27 +0000 (11:45 +0200)] 
Merge branch 'master' into dwarf

Conflicts:
tests/Makefile.am: New tests merged.

14 years agoMerge branch 'mjw/sdt'
Mark Wielaard [Tue, 3 May 2011 09:35:22 +0000 (11:35 +0200)] 
Merge branch 'mjw/sdt'

14 years agoMerge branch 'mjw/gdb_index'
Mark Wielaard [Thu, 28 Apr 2011 08:14:39 +0000 (10:14 +0200)] 
Merge branch 'mjw/gdb_index'

14 years agoAdd printing of .gdb_index section to readelf.
Mark Wielaard [Thu, 14 Apr 2011 21:47:26 +0000 (23:47 +0200)] 
Add printing of .gdb_index section to readelf.

14 years agolibdw: Sanity check end of section against cu_data () of die->cu.
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.

14 years agoAdd support for printing SDT elf notes.
Mark Wielaard [Sun, 24 Apr 2011 15:53:38 +0000 (17:53 +0200)] 
Add support for printing SDT elf notes.

libebl/
    * libebl.h (ebl_object_note_type_name): Add const char *name arg.
    * eblhooks.h (object_note_type_name): Likewise.
    * eblopenbackend.c (default_object_note_type_name): Likewise.
    * eblobjnotetypename.c (ebl_object_note_type_name): Likewise.
    And print version if name is "stapsdt".
    * eblobjnote.c (ebl_object_note): Add output for "stapsdt" notes.
src/
    * readelf.c (handle_notes_data): Call ebl_object_note_type_name
    with note name.

14 years agodwarflint: check_linkage_external_die.cc (is_external): Remove unused entry.
Mark Wielaard [Thu, 21 Apr 2011 12:57:45 +0000 (14:57 +0200)] 
dwarflint: check_linkage_external_die.cc (is_external): Remove unused entry.

14 years agodwarflint: Fix excessive alignment computation
Petr Machata [Tue, 19 Apr 2011 15:30:57 +0000 (17:30 +0200)] 
dwarflint: Fix excessive alignment computation

14 years agodwarflint: Revamp location reporting
Petr Machata [Tue, 19 Apr 2011 15:29:41 +0000 (17:29 +0200)] 
dwarflint: Revamp location reporting

- Drop struct where, introduce class locus, which is an abstract interface
  that the real locus classes implement.  Locus classes are still used as
  values, no heap allocation was necessary, although if polymorphism is
  necessary, loci can simply be new'ed and put in a vector etc.

- Formatting of most loci was kept the way it was, but some formats have
  been improved.  For example, DIE and abbrev loci now use attribute
  name directly to point to the attribute in question.

- Low-level allocation helpers (mostly WIPE) were dropped and replaced
  with constructors on those structures.  Placement new has to be used
  in a couple places to initialize data where REALLOC is still used.

- Functions that used to take struct where * now take locus const &.  The
  code was updated throughout.

- Values not corresponding to sections were removed from enum section_id.
  Part was dropped outright, because they were there just to support WHEREs,
  rel_* was moved to new class rel_target.

- Convert addr_recort, ref_record to classes inheriting off std::vector.
  ref_record in fact became ref_record_T and is now parametrized by
  locus type.

14 years agoFix doubled words.
Marek Polacek [Fri, 15 Apr 2011 09:41:32 +0000 (11:41 +0200)] 
Fix doubled words.

14 years agodwarflint: Add duplicate filtering also for C (non-stream based) wr_messages.
Mark Wielaard [Wed, 13 Apr 2011 11:44:38 +0000 (13:44 +0200)] 
dwarflint: Add duplicate filtering also for C (non-stream based) wr_messages.

wr_message () will ask for the id () filtering, so the "warning: " string
is already printed, so remove the same string from wr_vwarning ().

14 years agodwarflint: new check_die_line_info die check.
Mark Wielaard [Wed, 13 Apr 2011 10:33:29 +0000 (12:33 +0200)] 
dwarflint: new check_die_line_info die check.

Check that each code block start address is also mentioned in the
line table.

14 years agodwarflint: new check_die_decl_call.cc die_check.
Mark Wielaard [Wed, 13 Apr 2011 10:26:44 +0000 (12:26 +0200)] 
dwarflint: new check_die_decl_call.cc die_check.

Check that each decl or call attribute come in file/line and
column/line pairs.

14 years agoAdd elfutils::dwarf::attribute_type::find_integrate ().
Mark Wielaard [Tue, 12 Apr 2011 13:01:02 +0000 (15:01 +0200)] 
Add elfutils::dwarf::attribute_type::find_integrate ().

Same as find (), but if the attribute name isn't found,
but there is  is an abstract_origin or specification
attribute, then will try to find_integrate () the name
from that reference.

check_linkage_external_die.is_external () now uses it.

14 years agoFix libdwfl compile issue in case none of the compression libraries are there.
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.

14 years agodwarflint: check_dups_abstract_origin use wr_message id for filtering dups.
Mark Wielaard [Mon, 11 Apr 2011 14:34:17 +0000 (16:34 +0200)] 
dwarflint: check_dups_abstract_origin use wr_message id for filtering dups.

14 years agodwarflint: Don't assert in check_debug_info can trigger an assert.
Mark Wielaard [Mon, 11 Apr 2011 11:55:58 +0000 (13:55 +0200)] 
dwarflint: Don't assert in check_debug_info can trigger an assert.

Instead of asserting a form must exist, let form_class () return
max_dw_class, like ambiguous_class () does. max_dw_class is already
used as sentinel in read_die_chain () in case the attribute is unknown.
This lets things work out for the low level check_debug_info check and
then makes the higher-level checks complain about the unexpected form
instead. Added an example binary and test dwarflint/tests/run-upper.sh.

14 years agoRun elflint and dwarflint on c++ programs.
Mark Wielaard [Mon, 11 Apr 2011 11:08:57 +0000 (13:08 +0200)] 
Run elflint and dwarflint on c++ programs.

* tests/run-dwarflint-self.sh: Add dwarflint itself.
* tests/run-elflint-self.sh: Add dwarfcmp, unstrip and dwarflint.

14 years agoMerge branch 'default_dups' into dwarf
Mark Wielaard [Fri, 8 Apr 2011 22:25:47 +0000 (00:25 +0200)] 
Merge branch 'default_dups' into dwarf

14 years agodwarflint: check_dups_abstract_origin more specific and add member variables.
Mark Wielaard [Fri, 8 Apr 2011 22:09:26 +0000 (00:09 +0200)] 
dwarflint: check_dups_abstract_origin  more specific and add member variables.

14 years agodwarflint: anonymous typedef unions also can have linkage_name extension.
Mark Wielaard [Fri, 8 Apr 2011 21:10:15 +0000 (23:10 +0200)] 
dwarflint: anonymous typedef unions also can have linkage_name extension.

14 years agodwarflint: GNU upper_bound is allowed to also be a block (dwarf3 in dwarf2).
Mark Wielaard [Fri, 8 Apr 2011 20:15:54 +0000 (22:15 +0200)] 
dwarflint: GNU upper_bound is allowed to also be a block (dwarf3 in dwarf2).

14 years agodwarflint: Default to --dups=16.
Mark Wielaard [Fri, 8 Apr 2011 12:25:30 +0000 (14:25 +0200)] 
dwarflint: Default to --dups=16.

14 years agoMerge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf
Mark Wielaard [Fri, 8 Apr 2011 09:38:56 +0000 (11:38 +0200)] 
Merge branch 'dwarf' of git://git.fedorahosted.org/git/elfutils into dwarf

14 years agodwarflint: check_linkage_external_die keep symbol table and double check.
Mark Wielaard [Fri, 8 Apr 2011 09:30:58 +0000 (11:30 +0200)] 
dwarflint: check_linkage_external_die keep symbol table and double check.

We pull the symbol table from the dwarf file and check when a linkage_name
is set that the symbol table contains that name and is marked not marked
local, with the following exceptions:

- No symbol in table, OK, if not a defining or const object.
  Or GNU extension, anonymous structs can have a linkage_name.
- Symbol in table marked local, OK if not a defining object
  and marked external.  Which means it comes from some external
  symbol table.

14 years agodwarflint: expected-at GNU extension for anonymous typedef structs and enums.
Mark Wielaard [Fri, 8 Apr 2011 09:17:48 +0000 (11:17 +0200)] 
dwarflint: expected-at GNU extension for anonymous typedef structs and enums.

14 years agodwarflint: check_dups_abstract_origin allow subprogram defined outside body.
Mark Wielaard [Fri, 8 Apr 2011 09:16:11 +0000 (11:16 +0200)] 
dwarflint: check_dups_abstract_origin allow subprogram defined outside body.

A subprogram can be defined outside the body of the enclosing class,
then file and/or line attributes can differ.