From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
"Frediano Ziglio" <frediano.ziglio@cloud.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 3/3] x86/boot: Fix build with LLVM toolchain
Date: Thu, 7 Nov 2024 10:36:21 +0100 [thread overview]
Message-ID: <b633d472-6668-491b-82cb-2814c8aa5dbe@suse.com> (raw)
In-Reply-To: <8f87849c-916f-4532-a150-3205795c9e43@citrix.com>
On 06.11.2024 13:23, Andrew Cooper wrote:
> On 06/11/2024 11:41 am, Frediano Ziglio wrote:
>> This toolchain generates different object files.
>> Object have 3 additional sections which must be handled by the
>> linker script.
>> Added sections need to have special type so we put them in
>> separate sections as linker will copy type from input sections.
>>
>> Fixes: aa9045e77130 ('x86/boot: Rework how 32bit C is linked/included for early boot')
>>
>> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
>
> The patch itself is fine, but the commit message is quite stale now
> you've split the fix into 3 bits. I'd recommend:
>
> ---%<---
> x86/boot: Explicitly list .{sym,shstr,str}tab in build32.lds.S
>
> Currently, building with LLVM's LLD fails:
>
> ld -melf_i386_fbsd --orphan-handling=error -N -T ...
> ld: error: <internal>:(.symtab) is being placed in '.symtab'
> ld: error: <internal>:(.shstrtab) is being placed in '.shstrtab'
> ld: error: <internal>:(.strtab) is being placed in '.strtab'
> gmake[11]: *** [arch/x86/boot/Makefile:69:
> arch/x86/boot/built-in-32.base.bin] Error 1
>
> This is a consequence of --orphan-handling, and it appears that Binutils
> doesn't diagnose some orphaned sections even explicitly asked to do so.
With my binutils hat on, I'd like to express that I don't view this as a
fair statement. GNU ld simply doesn't extend the concept of orphaned
sections to purely control ones, which need processing / transforming in
one way or another anyway. Instead I'm puzzled by lld's behavior
requiring such sections to be named explicitly.
Jan
prev parent reply other threads:[~2024-11-07 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 11:41 [PATCH v2 0/3] x86/boot: Fix build with LLVM toolchain Frediano Ziglio
2024-11-06 11:41 ` [PATCH v2 1/3] x86/boot: Fix intermediate file names to generate 32 bit code Frediano Ziglio
2024-11-06 11:48 ` Andrew Cooper
2024-11-06 11:41 ` [PATCH v2 2/3] x86/boot: Uses nm command instead of map file to get symbols Frediano Ziglio
2024-11-06 12:10 ` Andrew Cooper
2024-11-06 11:41 ` [PATCH v2 3/3] x86/boot: Fix build with LLVM toolchain Frediano Ziglio
2024-11-06 12:23 ` Andrew Cooper
2024-11-07 9:36 ` 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=b633d472-6668-491b-82cb-2814c8aa5dbe@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=frediano.ziglio@cloud.com \
--cc=roger.pau@citrix.com \
--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.