From: Jan Beulich <jbeulich@suse.com>
To: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Cc: "Romain Caritey" <Romain.Caritey@microchip.com>,
"Baptiste Le Duc" <baptiste.le-duc@vates.tech>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 26/26] xen/riscv: do a 4th linking pass if necessary
Date: Tue, 7 Jul 2026 10:37:26 +0200 [thread overview]
Message-ID: <326e44ad-2014-43cd-bda8-e9c1faffe315@suse.com> (raw)
In-Reply-To: <66b5f31f-8ef6-4555-9c04-f5314512b598@gmail.com>
On 07.07.2026 10:19, Oleksii Kurochko wrote:
> On 7/6/26 6:13 PM, Jan Beulich wrote:
>> On 06.07.2026 17:58, Oleksii Kurochko wrote:
>>> Embedding the symbol table can shift sections and flip relaxation
>>> decisions, changing code size and thus the set of emitted symbols
>>> (e.g. gap end markers).
>>
>> What difference in symbols is there? (And: Do you mean the ELF symbol
>> table or what tools/symbols emits?) On ...
>
> The ELF symbol tables of .xen-syms.0 and .xen-syms.1 are identical
> (same names, types, and count; only addresses past a certain point
> differ). The difference is in what tools/symbols emits: the
> address-only "end of symbol" entry produced when want_symbol_end()
> is true, i.e. when a sized text symbol's end doesn't reach the next
> symbol's address:
>
> static bool want_symbol_end(unsigned int idx)
> {
> return table[idx].size &&
> (idx + 1 == table_cnt ||
> table[idx].addr + table[idx].size < table[idx + 1].addr);
> }
>
> In pass 1 (generated from .xen-syms.0): simple_strtoull is at
> 0xffffffffc00c0444 with size 0x16c, ending at 0xffffffffc00c05b0,
> while turn_on_mmu (alignment-pinned) starts at 0xffffffffc00c05c0.
> 16-byte gap -> the end marker at ...c05b0 is emitted.
>
> In pass 2 (generated from .xen-syms.1): simple_strtoull moved to
> 0xffffffffc00c0454 (same size), ending at exactly 0xffffffffc00c05c0
> == turn_on_mmu. No gap -> no end marker. Hence symbols_addresses
> shrinks by 8 and symbols_names by 1 (the marker's empty name).
>
>>
>>> Re-link with a regenerated table when its
>>> size differs from the previous pass.
>>>
>>> This mirrors commit 35de7285d508 ("Arm: do a 4th linking pass if
>>> necessary"), which riscv didn't receive when the underlying
>>> pass-2-vs-pass-3 check was extended to it in commit aa786d6e3467
>>> ("non-x86/symbols: check table sizes don't change between linking
>>> passes 2 and 3").
>>
>> ... Arm the problem was with a symbol (dis)appearing from/in the ELF
>> symbol table. The situation looks to be different here. Sadly ...
>
> I will rephrase then this paragraph to:
>
> This takes the same remedy as commit 35de7285d508 ("Arm: do a 4th
> linking pass if necessary"), though the underlying cause differs:
> here no symbol (dis)appears from the ELF symbol table; instead the
> set of end markers emitted by tools/symbols legitimately changes,
> because want_symbol_end() depends on code layout, and layout differs
> between passes due to linker relaxation.
>
> Or it could be just dropped.
Please don't drop it.
Jan
prev parent reply other threads:[~2026-07-07 8:37 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 15:57 [PATCH v5 00/26] Introduce enablemenant of dom0less Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 01/26] xen/dom0less: turn max_init_domid into a common variable Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 02/26] xen: arm: move declaration of map_device_irqs_to_domain() to common header Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 03/26] xen: arm: update p2m_set_allocation() prototype Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 04/26] xen/Kconfig: introduce HAS_STATIC_MEMORY Oleksii Kurochko
2026-07-07 9:52 ` Jan Beulich
2026-07-08 11:50 ` Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 05/26] xen/riscv: rename enum intc_version to intc_variant Oleksii Kurochko
2026-07-06 16:05 ` Jan Beulich
2026-07-07 7:34 ` Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 06/26] xen/riscv: Implement ARCH_PAGING_MEMPOOL Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 07/26] xen/riscv: Implement construct_domain() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 08/26] xen/riscv: implement prerequisites for domain_create() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 09/26] xen/riscv: introduce guest riscv,isa string Oleksii Kurochko
2026-07-09 13:05 ` Jan Beulich
2026-07-10 15:00 ` Oleksii Kurochko
2026-07-13 6:37 ` Jan Beulich
2026-07-06 15:57 ` [PATCH v5 10/26] xen/riscv: implement make_cpus_node() Oleksii Kurochko
2026-07-09 13:20 ` Jan Beulich
2026-07-10 16:00 ` Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 11/26] xen/riscv: implement make_timer_node() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 12/26] xen/riscv: implement make_arch_nodes() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 13/26] xen/riscv: introduce init interrupt controller operations Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 14/26] xen/riscv: implement make_intc_domU_node() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 15/26] xen/riscv: introduce aia_init() and aia_usable() Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 16/26] xen/riscv: introduce per-vCPU IMSIC state Oleksii Kurochko
2026-07-06 15:57 ` [PATCH v5 17/26] xen/riscv: introduce minimal virtual APLIC (vAPLIC) infrastructure Oleksii Kurochko
2026-07-09 15:39 ` Jan Beulich
2026-07-10 15:52 ` Oleksii Kurochko
2026-07-13 6:41 ` Jan Beulich
2026-07-13 9:57 ` Oleksii Kurochko
2026-07-13 15:44 ` Jan Beulich
2026-07-06 15:57 ` [PATCH v5 18/26] xen/riscv: introduce (de)initialization helpers for vINTC Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 19/26] xen/riscv: generate IMSIC DT node for guest domains Oleksii Kurochko
2026-07-09 15:49 ` Jan Beulich
2026-07-13 10:41 ` Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 20/26] xen/riscv: create APLIC " Oleksii Kurochko
2026-07-09 15:55 ` Jan Beulich
2026-07-06 15:58 ` [PATCH v5 21/26] xen/riscv: implement IRQ routing for device passthrough Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 22/26] xen/riscv: implement init_intc_phandle() Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 23/26] xen/riscv: initialize RCU, scheduler, and system domains in start_xen() Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 24/26] xen/riscv: provide init_vuart() Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 25/26] xen/riscv: add initial dom0less infrastructure support Oleksii Kurochko
2026-07-06 15:58 ` [PATCH v5 26/26] xen/riscv: do a 4th linking pass if necessary Oleksii Kurochko
2026-07-06 16:13 ` Jan Beulich
2026-07-07 8:19 ` Oleksii Kurochko
2026-07-07 8:37 ` Jan Beulich [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=326e44ad-2014-43cd-bda8-e9c1faffe315@suse.com \
--to=jbeulich@suse.com \
--cc=Romain.Caritey@microchip.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=baptiste.le-duc@vates.tech \
--cc=connojdavis@gmail.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=roger.pau@citrix.com \
--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.