17 Commits

Author SHA1 Message Date
unknown 705c22626b update to v0.190
Signed-off-by: unknown <zhangchun39@huawei.com>
2024-12-06 15:48:16 +08:00
Joshua Watt 555e15ebe8 Use fallthrough attribute.
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.

The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.

Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2018-02-10 03:19:26 +01:00
Ulf Hermann 17d7194d29 Make sure packed structs follow the gcc memory layout
gcc defaults to using struct layouts that follow the native conventions,
even if __attribute__((packed)) is given. In order to get the layout we
expect, we need to tell gcc to always use the gcc struct layout, at
least for packed structs. To do this, we can use the gcc_struct
attribute.

This is important, not only for porting to windows, but also potentially
for other platforms, as the bugs resulting from struct layout
differences are rather subtle and hard to find.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
2017-09-20 21:40:31 +02:00
Mark Wielaard a3cc8182b2 Add GCC7 -Wimplicit-fallthrough support/fixes.
GCC7 will have a new -Wimplicit-fallthrough warning. It did catch one
small buglet in elflint option procession. So it seems useful to enable
to make sure all swatch case fallthroughs are deliberate.

Add configure check to detect whether gcc support -Wimplicit-fallthrough
and enable it. Add fixes and explicit fallthrough comments where necessary.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2016-11-10 11:59:00 +01:00
Andreas Schwab 56dce92a36 Add m68k tests
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
2016-07-11 10:22:18 +02:00
Andreas Schwab 37bb3fcd90 Add support for m68k
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
2016-05-23 13:32:01 +02:00
Mark Wielaard 1ccdfb683a Remove old-style function definitions.
We already require -std=gnu99 and old-style function definitions might
hide some compiler warnings.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2015-09-23 15:50:55 +02:00
H.J. Lu 28ce4e89d3 backends: Add x32_corenote.c
This patch adds x32_corenote.c to support x32 coredump.  X32 coredump is
a hybrid between ia32 coredump and x86-64 coredump.  The exact formats
are described in bfd/hosts/x86-64linux.h in GNU binutils source tree.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2015-04-01 20:45:13 +02:00
Jan Kratochvil cc84d79da3 backends/
* Makefile.am (s390_SRCS): Add s390_corenote.c and s390x_corenote.c.
	* linux-core-note.c (ALIGN_PR_REG): New definitions.
	(struct EBLHOOK(prstatus)): Change field pr_reg to anonymous struct with
	ALIGN_PR_REG.
	(EXTRA_ITEMS): New macro.
	* s390_corenote.c: New file.
	* s390_init.c (s390x_core_note): New declaration.
	(s390_init): Install s390x_core_note and s390_core_note.
	* s390x_corenote.c: New file.

tests/
	* run-readelf-mixed-corenote.sh: New testcase for readelf -n of s390
	and s390x core notes.
	* testfile67.bz2: New file.
	* testfile68.bz2: New file.
	* Makefile.am (EXTRA_DIST): Add testfile67.bz2 and testfile68.bz2 .

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
2013-01-30 20:34:17 +01:00
Jan Kratochvil 4bdbb6716d src/
2012-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* readelf.c (ITEM_WRAP_COLUMN, REGISTER_WRAP_COLUMN): Merge to ...
	(WRAP_COLUMN): ... here.
	(print_core_item): Remove parameter format_max.  Update function
	comment.  Replace FORMAT_MAX by the real output width.
	(handle_core_item): Remove the FORMAT_MAX values in TYPES, DO_TYPE,
	calls of print_core_item, remove variable maxfmt, change
	ITEM_WRAP_COLUMN to WRAP_COLUMN.
	(handle_core_register): Remove the FORMAT_MAX values in TYPES, BITS,
	calls of print_core_item, change REGISTER_WRAP_COLUMN to WRAP_COLUMN.

backends/
2012-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* linux-core-note.c (prstatus_items): Rename groups of sigpend and
	sighold to signal2 and signal3.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
2012-10-12 20:54:20 +02:00
Petr Machata 4a97fd9599 Add back end code for interpreting NT_ARM_VFP core note.
Signed-off-by: Petr Machata <pmachata@redhat.com>
2012-09-25 01:37:20 +02:00
Mark Wielaard de2ed97f33 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>
2012-06-05 23:12:05 +02:00
Roland McGrath 0ccbbcd124 Make readelf -n check note name strings, handle "VMCOREINFO" flavor. 2010-01-04 21:59:07 -08:00
Roland McGrath 1d8bb25cac src/
(find_symbol): Likewise.
	Convert plain number, or handle strings like "(section)+offset"
	or "symbol+offset".
2008-08-07 08:39:41 +00:00
Roland McGrath e4c22ea004 2007-10-23 Roland McGrath <roland@redhat.com>
* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
	module to appear first.
2007-10-23 13:07:39 +00:00
Ulrich Drepper b597dfad92 merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'
and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
2007-10-16 05:21:27 +00:00
Roland McGrath cb6d865011 readelf register printing sort order tweak 2007-08-23 08:10:54 +00:00