From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Oleksii Kurochko" <oleksii.kurochko@gmail.com>
Subject: [PATCH v2 7/7] RISC-V: place .sdata / .srodata / .riscv.attributes
Date: Wed, 26 Aug 2026 14:04:08 +0200 [thread overview]
Message-ID: <f26f80e3-0b2d-429a-895c-b8003d1c5a38@suse.com> (raw)
In-Reply-To: <9a78fdea-08ba-4e04-bfa1-ba09730a300b@suse.com>
Of the short-data sections, only .sbss is presently mentioned in the
linker script. Place them next to, but ahead of their "normal" data
sections.
.riscv.attributes can go towards the tail of the image, next to (ahead of)
debug info.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Seeing where .sbss lives, does positioning really not matter at all? I
would have expected that short-data sections want to live close together,
and specifically close to .text / .init.text (seeing that such data is
accessed using AUIPC). I'm puzzled that the psABI doesn't even mention
them, hence leaving it open how exactly they are to be used.
What remains to eliminate orphan section warnings is the placement of
.note.GNU-stack (which perhaps wants dealing with on all of Arm, PPC, and
RISC-V together, ideally unifying with x86) and (odd at the first glance,
but dealt with on x86 as well, i.e. may again want unifying) that of a
number of .rela.* sections.
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -44,6 +44,8 @@ SECTIONS
BUGFRAMES
+ *(.srodata)
+ *(.srodata.*)
*(.rodata)
*(.rodata.*)
VPCI_ARRAY
@@ -92,6 +94,7 @@ SECTIONS
SCHEDULER_ARRAY
HYPFS_PARAM
+ *(.sdata .sdata.*)
*(.data .data.*)
CONSTRUCTORS
} :text
@@ -162,6 +165,8 @@ SECTIONS
/* Section for the device tree blob (if any). */
.dtb : { *(.dtb) } :text
+ .riscv.attributes : { *(.riscv.attributes) } :text
+
DWARF2_DEBUG_SECTIONS
DISCARD_SECTIONS
next prev parent reply other threads:[~2026-08-26 12:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 11:57 [PATCH v2 0/7] build: split and unify linking of final image(s) Jan Beulich
2026-08-26 12:00 ` [PATCH v2 1/7] x86: split xen-syms/xen.efi linking rules Jan Beulich
2026-09-02 14:52 ` Anthony PERARD
2026-09-03 7:26 ` Jan Beulich
2026-08-26 12:00 ` [PATCH v2 2/7] Arm: split xen-syms linking rule Jan Beulich
2026-09-02 16:32 ` Anthony PERARD
2026-09-03 7:35 ` Jan Beulich
2026-08-26 12:01 ` [PATCH v2 3/7] RISC-V: " Jan Beulich
2026-08-27 15:56 ` Oleksii Kurochko
2026-08-27 16:01 ` Jan Beulich
2026-08-27 16:12 ` Oleksii Kurochko
2026-08-26 12:01 ` [PATCH v2 4/7] PPC: " Jan Beulich
2026-09-03 11:50 ` Anthony PERARD
2026-08-26 12:02 ` [PATCH v2 5/7] build: move $(all-symbols-*) Jan Beulich
2026-09-03 11:54 ` Anthony PERARD
2026-08-26 12:03 ` [PATCH v2 6/7] build: move $(compare-symbol-tables) Jan Beulich
2026-09-03 11:55 ` Anthony PERARD
2026-08-26 12:04 ` Jan Beulich [this message]
2026-08-27 15:40 ` [PATCH v2 7/7] RISC-V: place .sdata / .srodata / .riscv.attributes Oleksii Kurochko
2026-08-27 15:53 ` Andrew Cooper
2026-08-27 15:56 ` Jan Beulich
2026-08-27 16:07 ` Oleksii Kurochko
2026-09-01 7:52 ` Jan Beulich
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=f26f80e3-0b2d-429a-895c-b8003d1c5a38@suse.com \
--to=jbeulich@suse.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=connojdavis@gmail.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=roger@xenproject.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.