From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Cc: goldstein.w.n@gmail.com
Subject: [PATCH 4/4] ld: Document --text-section-ordering-file FILE
Date: Fri, 19 Jan 2024 11:45:52 -0800 [thread overview]
Message-ID: <20240119194552.1255481-5-hjl.tools@gmail.com> (raw)
In-Reply-To: <20240119194552.1255481-1-hjl.tools@gmail.com>
--text-section-ordering-file FILE is supported only in ELF and PE COFF
linkers which support input .text.* sections.
* NEWS: Mention --text-section-ordering-file FILE.
* ld.texi: Document text-section-ordering-file FILE.
---
ld/NEWS | 3 +++
ld/ld.texi | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/ld/NEWS b/ld/NEWS
index c3ebe320e5e..c98570f308a 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,8 @@
-*- text -*-
+* Add the linker option, --text-section-ordering-file FILE, for ELF and
+ PE COFF linker to specify the input text section order.
+
Changes in 2.42:
* Add -z mark-plt/-z nomark-plt options to x86-64 ELF linker to mark PLT
diff --git a/ld/ld.texi b/ld/ld.texi
index 4fda259a552..d1bb59202de 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2541,6 +2541,17 @@ patterns in the linker script.
This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section
patterns in the linker script.
+@kindex text-section-ordering-file=@file{file}
+@item text-section-ordering-file=@file{file}
+This option groups input text sections together in the order specified
+in the file which contains the list of text section wildcards starting
+with @code{.}, separated by whitespace.
+
+If the @option{verbose} option is enabled, the contents of the text
+section ordering file will be reported.
+
+This option is supported only in ELF and PE COFF linkers.
+
@kindex --spare-dynamic-tags
@item --spare-dynamic-tags=@var{count}
This option specifies the number of empty slots to leave in the
--
2.43.0
prev parent reply other threads:[~2024-01-19 19:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 19:45 [PATCH 0/4] ld: Add " H.J. Lu
2024-01-19 19:45 ` [PATCH 1/4] " H.J. Lu
2024-01-19 21:50 ` Fangrui Song
[not found] ` <DS7PR12MB5765A2B98C7E1217F8C374B9CB702@DS7PR12MB5765.namprd12.prod.outlook.com>
2024-01-19 22:13 ` H.J. Lu
2024-01-19 23:15 ` Fangrui Song
2024-01-22 7:37 ` Jan Beulich
2024-01-22 12:51 ` H.J. Lu
2024-01-22 18:22 ` Noah Goldstein
2024-01-22 18:45 ` H.J. Lu
2024-01-24 14:41 ` H.J. Lu
[not found] ` <DS7PR12MB5765059CCA55EC755F8132ACCB702@DS7PR12MB5765.namprd12.prod.outlook.com>
2024-01-20 14:12 ` H.J. Lu
2024-01-19 19:45 ` [PATCH 2/4] ld: Include the text section order file in all ELF linker scripts H.J. Lu
2024-01-19 20:00 ` Noah Goldstein
2024-01-19 20:18 ` H.J. Lu
2024-01-19 20:38 ` Noah Goldstein
2024-01-19 20:40 ` H.J. Lu
2024-01-19 21:07 ` Noah Goldstein
2024-01-19 19:45 ` [PATCH 3/4] ld: Include the text section order file in PE COFF " H.J. Lu
2024-01-19 19:45 ` H.J. Lu [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=20240119194552.1255481-5-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=goldstein.w.n@gmail.com \
/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).