From e263a66b01a697632a51ad5ec1e6c08071e3e5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= Date: Fri, 18 Nov 2022 15:45:55 +0100 Subject: readelf: add support for QNT_STACK note subsections QNX provides some .note subsections. QNT_STACK is the one controling the stack allocation. bfd/ChangeLog: * elf.c (BFD_QNT_CORE_INFO): Delete. (BFD_QNT_CORE_STATUS): Likewise. (BFD_QNT_CORE_GREG): Likewise. (BFD_QNT_CORE_FPREG): Likewise. (elfcore_grok_nto_note): Replace BFD_QNT_* by QNT_*. binutils/ChangeLog: * readelf.c (get_qnx_elfcore_note_type): New function. (print_qnx_note): New function. (process_note): Add support for QNX support. include/ChangeLog: * elf/common.h (QNT_DEBUG_FULLPATH): New define. (QNT_DEBUG_RELOC): New define. (QNT_STACK): New define. (QNT_GENERATOR): New define. (QNT_DEFAULT_LIB): New define. (QNT_CORE_SYSINFO): New define. (QNT_CORE_INFO): New define. (QNT_CORE_STATUS): New define. (QNT_CORE_GREG): New define. (QNT_CORE_FPREG): New define. (QNT_LINK_MAP): New define. --- bfd/elf.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'bfd') diff --git a/bfd/elf.c b/bfd/elf.c index 409be70..5c3b3c0 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -11543,11 +11543,6 @@ elfcore_grok_nto_regs (bfd *abfd, return true; } -#define BFD_QNT_CORE_INFO 7 -#define BFD_QNT_CORE_STATUS 8 -#define BFD_QNT_CORE_GREG 9 -#define BFD_QNT_CORE_FPREG 10 - static bool elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) { @@ -11558,13 +11553,13 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) switch (note->type) { - case BFD_QNT_CORE_INFO: + case QNT_CORE_INFO: return elfcore_make_note_pseudosection (abfd, ".qnx_core_info", note); - case BFD_QNT_CORE_STATUS: + case QNT_CORE_STATUS: return elfcore_grok_nto_status (abfd, note, &tid); - case BFD_QNT_CORE_GREG: + case QNT_CORE_GREG: return elfcore_grok_nto_regs (abfd, note, tid, ".reg"); - case BFD_QNT_CORE_FPREG: + case QNT_CORE_FPREG: return elfcore_grok_nto_regs (abfd, note, tid, ".reg2"); default: return true; -- cgit v1.1