Fix doubled words.

Signed-off-by: rofl0r <retnyg@gmx.net>
elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.

Reported-by: Kurt Roeckx <kurt@roeckx.be>

Signed-off-by: rofl0r <retnyg@gmx.net>
Don't exclude sh_type >= SHT_NUM from stripping.

Signed-off-by: rofl0r <retnyg@gmx.net>
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().

Signed-off-by: rofl0r <retnyg@gmx.net>
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>
Signed-off-by: rofl0r <retnyg@gmx.net>
elf*_xlatetom: do not check ELF_T_NHDR has integer number of records

See this bug report for more details:
  https://bugzilla.redhat.com/show_bug.cgi?id=835877

Signed-off-by: Petr Machata <pmachata@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
elf_getshdr should work for elf->flags & ELF_F_MALLOCED.

Reported-by: Nick Alcock <nix@esperi.org.uk>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
Implement support for archives with 64-bit symbol table

Signed-off-by: Petr Machata <pmachata@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
elf32_checksum.c: Removed unused ebl_debugscn_p define and confusing comment.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
Update elf.h from glibc.

Signed-off-by: Roland McGrath <roland@hack.frob.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
Update elf.h from glibc.

Signed-off-by: Petr Machata <pmachata@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
elf_getarsym: Use memcpy instead of pointer dereference so as not to assume the field is naturally aligned.

Signed-off-by: Roland McGrath <roland@hack.frob.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
elf_getarsym: Handle unaligned data in archive index.

Signed-off-by: rofl0r <retnyg@gmx.net>
gelf_getauxv: Use memcpy, not pointer deref, to avoid alignment problems.

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
gelf_getauxv: Remove unnecessary casts to char *.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
gelf_getauxv: Add missing whitespace.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
gelf.h: Fix typo in comment.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Signed-off-by: rofl0r <retnyg@gmx.net>
remove unneeded/obsolete files
add some utils