From: Frederic Cambus <fred@statdns.com>
To: binutils@sourceware.org
Subject: [PATCH] Add support to readelf for the PT_OPENBSD_NOBTCFI segment type.
Date: Thu, 21 Sep 2023 16:31:16 +0200 [thread overview]
Message-ID: <ZQxTtMITWftXrjRr@hydra> (raw)
binutils * readelf.c (get_segment_type): Handle PT_OPENBSD_NOBTCFI segment type.
include * elf/common.h (PT_OPENBSD_NOBTCFI): Define.
---
binutils/ChangeLog | 5 +++++
binutils/readelf.c | 1 +
include/ChangeLog | 4 ++++
include/elf/common.h | 1 +
4 files changed, 11 insertions(+)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ac14aff1827..4e58cc2e3dd 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2023-09-21 Frederic Cambus <fred@statdns.com>
+
+ * readelf.c (get_segment_type): Handle PT_OPENBSD_NOBTCFI segment
+ type.
+
2023-09-05 Nick Clifton <nickc@redhat.com>
PR 30684
diff --git a/binutils/readelf.c b/binutils/readelf.c
index e9935c010cf..be2f3851c63 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5082,6 +5082,7 @@ get_segment_type (Filedata * filedata, unsigned long p_type)
case PT_OPENBSD_MUTABLE: return "OPENBSD_MUTABLE";
case PT_OPENBSD_RANDOMIZE: return "OPENBSD_RANDOMIZE";
case PT_OPENBSD_WXNEEDED: return "OPENBSD_WXNEEDED";
+ case PT_OPENBSD_NOBTCFI: return "OPENBSD_NOBTCFI";
case PT_OPENBSD_BOOTDATA: return "OPENBSD_BOOTDATA";
default:
diff --git a/include/ChangeLog b/include/ChangeLog
index eb54da44146..90eb51f9208 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2023-09-21 Frederic Cambus <fred@statdns.com>
+
+ * elf/common.h (PT_OPENBSD_NOBTCFI): Define.
+
2023-08-02 Tom Tromey <tromey@adacore.com>
* coff/x86_64.h (COFF_X86_64_H): Add include guard.
diff --git a/include/elf/common.h b/include/elf/common.h
index 932ea94e3ae..ad95dbc965f 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -495,6 +495,7 @@
#define PT_OPENBSD_MUTABLE (PT_LOOS + 0x5a3dbe5) /* Like bss, but not immutable. */
#define PT_OPENBSD_RANDOMIZE (PT_LOOS + 0x5a3dbe6) /* Fill with random data. */
#define PT_OPENBSD_WXNEEDED (PT_LOOS + 0x5a3dbe7) /* Program does W^X violations. */
+#define PT_OPENBSD_NOBTCFI (PT_LOOS + 0x5a3dbe8) /* no branch target CFI. */
#define PT_OPENBSD_BOOTDATA (PT_LOOS + 0x5a41be6) /* Section for boot arguments. */
/* Mbind segments */
--
2.41.0
next reply other threads:[~2023-09-21 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 14:31 Frederic Cambus [this message]
2023-09-27 13:38 ` Nick Clifton
2023-09-28 11:05 ` Frederic Cambus
2023-09-28 12:39 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZQxTtMITWftXrjRr@hydra \
--to=fred@statdns.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).