From: Jan Beulich <jbeulich@suse.com>
To: Frediano Ziglio <frediano.ziglio@cloud.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/boot: Fix build with LLVM toolchain
Date: Thu, 7 Nov 2024 10:46:04 +0100 [thread overview]
Message-ID: <9947c21d-b5f7-4197-b6d9-dd4d491a30c2@suse.com> (raw)
In-Reply-To: <CACHz=ZjZVPSueWjxfWBjbjg8_UhZc7hMwM49BFT0bipqeBOsSA@mail.gmail.com>
On 06.11.2024 12:58, Frediano Ziglio wrote:
> On Wed, Nov 6, 2024 at 11:45 AM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 06.11.2024 12:34, Frediano Ziglio wrote:
>>> On Wed, Nov 6, 2024 at 10:59 AM Jan Beulich <jbeulich@suse.com> wrote:
>>>>
>>>> On 06.11.2024 07:56, Frediano Ziglio wrote:
>>>>> On Tue, Nov 5, 2024 at 5:06 PM Jan Beulich <jbeulich@suse.com> wrote:
>>>>>>
>>>>>> On 05.11.2024 17:35, Frediano Ziglio wrote:
>>>>>>> On Tue, Nov 5, 2024 at 3:32 PM Jan Beulich <jbeulich@suse.com> wrote:
>>>>>>>>
>>>>>>>> On 05.11.2024 15:55, Frediano Ziglio wrote:
>>>>>>>>> This toolchain generates different object and map files.
>>>>>>>>> Account for these changes.
>>>>>>>>
>>>>>>>> At least briefly mentioning what exactly the differences are would be
>>>>>>>> quite nice, imo.
>>>>>>>>
>>>>>>>
>>>>>>> What about.
>>>>>>>
>>>>>>> Object have 3 additional sections which must be handled by the linker script.
>>>>>>
>>>>>> I expect these sections are there in both cases. The difference, I assume,
>>>>>> is that for the GNU linker they don't need mentioning in the linker script.
>>>>>> Maybe that's what you mean to say, but to me at least the sentence can also
>>>>>> be interpreted differently.
>>>>>
>>>>> Why do you expect such sections? They are used for dynamic symbols in
>>>>> shared objects, we don't use shared objects here. Normal object
>>>>> symbols are not handled by these sections. GNU compiler+linker (we
>>>>> link multiple objects together) do not generate these sections. So the
>>>>> comment looks correct to me.
>>>>
>>>> About every ELF object will have .symtab and .strtab, and many also a
>>>> separate .shstrtab. There's nothing "dynamic" about them. IOW - I'm
>>>> confused by your reply.
>>>
>>> I checked the object files and there are no such sections using GNU toolchain.
>>
>> I think I checked every *.o that's under boot/, and they all have these three
>> sections. Can you clarify which one(s) specifically you checked?
>
> $ gcc --version
> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ ld --version
> GNU ld (GNU Binutils for Ubuntu) 2.38
> Copyright (C) 2022 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public Licence version 3 or (at your option) a later version.
> This program has absolutely no warranty.
>
> $ find xen/normal/ xen/pvh/ -name \*.o | xargs -ifilename sh -c
> 'objdump -x filename' | grep -e \\.
> shstrtab -e \\.strtab -e \\.symtab
>
> (xen/normal and xen/pvh are the build directory, with different configurations)
>
> I'm saying that's possibly why the linker scripts didn't need to
> specify these sections.
Just to mention it here as well - objdump's -x option doesn't include "control"
sections. Considering the help text for -x this feels like a bug. However, as
documentation has it:
"Display all available header information, including the symbol table and
relocation entries."
the symbol table and possible relocations _are_ being displayed, just not as
part of "Sections:".
Jan
next prev parent reply other threads:[~2024-11-07 9:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 14:55 [PATCH] x86/boot: Fix build with LLVM toolchain Frediano Ziglio
2024-11-05 15:32 ` Jan Beulich
2024-11-05 16:35 ` Frediano Ziglio
2024-11-05 17:06 ` Jan Beulich
2024-11-06 6:56 ` Frediano Ziglio
2024-11-06 10:59 ` Jan Beulich
2024-11-06 11:34 ` Frediano Ziglio
2024-11-06 11:45 ` Jan Beulich
2024-11-06 11:58 ` Frediano Ziglio
2024-11-06 12:37 ` Roger Pau Monné
2024-11-07 9:46 ` Jan Beulich [this message]
2024-11-05 19:23 ` Andrew Cooper
2024-11-06 10:32 ` Alejandro Vallejo
2024-11-06 10:50 ` Andrew Cooper
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=9947c21d-b5f7-4197-b6d9-dd4d491a30c2@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=frediano.ziglio@cloud.com \
--cc=julien@xen.org \
--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.