* [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type.
@ 2023-03-17 7:50 Frederic Cambus
2023-03-22 13:42 ` Nick Clifton
0 siblings, 1 reply; 4+ messages in thread
From: Frederic Cambus @ 2023-03-17 7:50 UTC (permalink / raw)
To: binutils
binutils/ChangeLog:
2023-03-17 Frederic Cambus <fred@statdns.com>
* readelf.c (get_segment_type): Handle PT_OPENBSD_MUTABLE segment type.
include/ChangeLog:
2023-03-17 Frederic Cambus <fred@statdns.com>
* elf/common.h (PT_OPENBSD_MUTABLE): Define.
---
binutils/readelf.c | 1 +
include/elf/common.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 0d9d2017901..33df75561c1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4643,6 +4643,7 @@ get_segment_type (Filedata * filedata, unsigned long p_type)
case PT_OPENBSD_RANDOMIZE: return "OPENBSD_RANDOMIZE";
case PT_OPENBSD_WXNEEDED: return "OPENBSD_WXNEEDED";
case PT_OPENBSD_BOOTDATA: return "OPENBSD_BOOTDATA";
+ case PT_OPENBSD_MUTABLE: return "OPENBSD_MUTABLE";
default:
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
diff --git a/include/elf/common.h b/include/elf/common.h
index d19d6f9927d..e99f2bb864e 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -492,6 +492,7 @@
#define PT_GNU_SFRAME (PT_LOOS + 0x474e554) /* SFrame stack trace information */
/* OpenBSD segment types. */
+#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_BOOTDATA (PT_LOOS + 0x5a41be6) /* Section for boot arguments. */
--
2.39.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type.
2023-03-17 7:50 [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type Frederic Cambus
@ 2023-03-22 13:42 ` Nick Clifton
2023-03-23 10:27 ` Frederic Cambus
0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2023-03-22 13:42 UTC (permalink / raw)
To: Frederic Cambus, binutils
Hi Fred,
> binutils/ChangeLog:
>
> 2023-03-17 Frederic Cambus <fred@statdns.com>
>
> * readelf.c (get_segment_type): Handle PT_OPENBSD_MUTABLE segment type.
>
> include/ChangeLog:
>
> 2023-03-17 Frederic Cambus <fred@statdns.com>
>
> * elf/common.h (PT_OPENBSD_MUTABLE): Define.
Patch approved - please apply.
Is there any chance that you could create a binutils/linker testcase
for this new feature ? You can use a linker script to create segments
with specific types...
Cheers
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type.
2023-03-22 13:42 ` Nick Clifton
@ 2023-03-23 10:27 ` Frederic Cambus
2023-03-23 15:21 ` Nick Clifton
0 siblings, 1 reply; 4+ messages in thread
From: Frederic Cambus @ 2023-03-23 10:27 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
Hi Nick,
On Wed, Mar 22, 2023 at 01:42:08PM +0000, Nick Clifton wrote:
> > binutils/ChangeLog:
> >
> > 2023-03-17 Frederic Cambus <fred@statdns.com>
> >
> > * readelf.c (get_segment_type): Handle PT_OPENBSD_MUTABLE segment type.
> >
> > include/ChangeLog:
> >
> > 2023-03-17 Frederic Cambus <fred@statdns.com>
> >
> > * elf/common.h (PT_OPENBSD_MUTABLE): Define.
>
> Patch approved - please apply.
Thanks for the review. I don't have commit access, could you please
commit it for me?
> Is there any chance that you could create a binutils/linker testcase
> for this new feature ? You can use a linker script to create segments
> with specific types...
Sure, I can have a look when time allows. I haven't had the chance to get
exposure to the testing infrastructure yet, so that sounds like a great
opportunity to do so :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type.
2023-03-23 10:27 ` Frederic Cambus
@ 2023-03-23 15:21 ` Nick Clifton
0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2023-03-23 15:21 UTC (permalink / raw)
To: Frederic Cambus; +Cc: binutils
Hi Frederic,
> Thanks for the review. I don't have commit access, could you please
> commit it for me?
Done. :-)
Cheers
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-23 15:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 7:50 [PATCH] Add support to readelf for the PT_OPENBSD_MUTABLE segment type Frederic Cambus
2023-03-22 13:42 ` Nick Clifton
2023-03-23 10:27 ` Frederic Cambus
2023-03-23 15:21 ` Nick Clifton
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).