summaryrefslogtreecommitdiff
path: root/backends/linux-core-note.c
Commit message (Collapse)AuthorAgeFilesLines
* Initialize reglocs for VMCOREINFOIlya Leoshkevich2023-02-081-0/+1
| | | | | | | | | | | | | | | | | MSan complains: Uninitialized value was created by an allocation of 'reglocs' in the stack frame #0 0x562d35c686f0 in handle_core_note elfutils/src/readelf.c:12674:3 #const Ebl_Register_Location *reglocs; ==1006199==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x562d35c68a2a in handle_core_note elfutils/src/readelf.c:12692:11 #colno = handle_core_registers (ebl, ebl->elf, desc + regs_offset, # reglocs, nregloc); Strictly speaking, this is not a problem, because nregloc == 0, but for other note types we initialize it anyway, so do it here as well. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
* Use fallthrough attribute.Joshua Watt2018-02-101-1/+1
| | | | | | | | | | | | | | | 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>
* Make sure packed structs follow the gcc memory layoutUlf Hermann2017-09-201-1/+1
| | | | | | | | | | | | | | 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>
* Add GCC7 -Wimplicit-fallthrough support/fixes.Mark Wielaard2016-11-101-2/+2
| | | | | | | | | | | 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>
* Add m68k testsAndreas Schwab2016-07-111-1/+5
| | | | Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
* Add support for m68kAndreas Schwab2016-05-231-1/+3
| | | | Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
* Remove old-style function definitions.Mark Wielaard2015-09-231-8/+4
| | | | | | | We already require -std=gnu99 and old-style function definitions might hide some compiler warnings. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* backends: Add x32_corenote.cH.J. Lu2015-04-011-5/+19
| | | | | | | | 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>
* backends/Jan Kratochvil2013-01-301-1/+22
| | | | | | | | | | | | | | | | | | | | | * 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>
* src/Jan Kratochvil2012-10-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* Add back end code for interpreting NT_ARM_VFP core note.Petr Machata2012-09-251-0/+11
| | | | Signed-off-by: Petr Machata <pmachata@redhat.com>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Make readelf -n check note name strings, handle "VMCOREINFO" flavor.Roland McGrath2010-01-041-9/+49
|
* src/Roland McGrath2008-08-071-3/+3
| | | | | | (find_symbol): Likewise. Convert plain number, or handle strings like "(section)+offset" or "symbol+offset".
* 2007-10-23 Roland McGrath <roland@redhat.com>Roland McGrath2007-10-231-19/+14
| | | | | | * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel module to appear first.
* merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'Ulrich Drepper2007-10-161-4/+13
| | | | and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
* readelf register printing sort order tweakRoland McGrath2007-08-231-0/+218