From: "Cristian Rodríguez" <cristian@rodriguez.im>
To: Sergey Bugaev <bugaevc@gmail.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [RFC PATCH 0/6] .text.subsections for some questionable benefit
Date: Mon, 15 May 2023 11:33:11 -0400 [thread overview]
Message-ID: <CAPBLoAfGC3XjN5w-PxSDx+1013SKS9=e5OsyJ3GtSy06TnafNA@mail.gmail.com> (raw)
In-Reply-To: <20230515144815.3939017-1-bugaevc@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
On Mon, May 15, 2023 at 10:48 AM Sergey Bugaev via Libc-alpha <
libc-alpha@sourceware.org> wrote:
>
> One more thing: the Linux kernel has a somewhat similar thing with
> __init and __exit macros, which place the annotated function into
> .init.text and .exit.text. They then do further tricks with this, such
> (potentially?) unmapping the pages containing .init.text after startup
> is completed. The SerenityOS Kernel similarly has UNMAP_AFTER_INIT
> (and READONLY_AFTER_INIT, which is like attribute_relro).
>
>
This not only for functions but variables is a sorely missed
compiler/linker extension that will be very useful to have, many programs
need single use routines
that never ought to be called again.. or ro_after_init variables, not just
the kernel or libc..
prev parent reply other threads:[~2023-05-15 15:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 14:48 Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 1/6] Mark more functions as __COLD Sergey Bugaev
2023-05-15 15:22 ` Andreas Schwab
2023-05-15 15:27 ` Sergey Bugaev
2023-05-18 17:06 ` [PATCH v2] " Sergey Bugaev
2023-05-18 19:43 ` Adhemerval Zanella Netto
2023-05-19 10:35 ` Sergey Bugaev
2023-05-22 20:41 ` Adhemerval Zanella Netto
2023-05-15 14:48 ` [RFC PATCH 2/6] mcheck: Microoptimize Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 3/6] sys/cdefs.h: Define __TEXT_STARTUP & __TEXT_EXIT Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 4/6] Mark various functions as __TEXT_STARTUP and __TEXT_EXIT Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 5/6] Also place entry points into .text.startup Sergey Bugaev
2023-05-15 14:48 ` [RFC PATCH 6/6] mach: In rtld, mark MIG routines as __TEXT_STARTUP Sergey Bugaev
2023-05-15 15:33 ` Cristian Rodríguez [this message]
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='CAPBLoAfGC3XjN5w-PxSDx+1013SKS9=e5OsyJ3GtSy06TnafNA@mail.gmail.com' \
--to=cristian@rodriguez.im \
--cc=bugaevc@gmail.com \
--cc=libc-alpha@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).