From: "Jan Beulich" <JBeulich@suse.com>
To: "Roger Pau Monne" <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Daniel Kiper <daniel.kiper@oracle.com>, WeiLiu <wl@xen.org>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH 3/4] x86/linker: add a reloc section to ELF binary
Date: Fri, 21 Jun 2019 00:34:13 -0600 [thread overview]
Message-ID: <5D0C7A650200007800239F04@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20190619150631.5dhiozx4bybqjbrl@MacBook-Air-de-Roger.local>
>>> On 19.06.19 at 17:06, <roger.pau@citrix.com> wrote:
> On Wed, Jun 19, 2019 at 06:57:05AM -0600, Jan Beulich wrote:
>> >>> On 19.06.19 at 13:02, <roger.pau@citrix.com> wrote:
>> > If the hypervisor has been built with EFI support (ie: multiboot2).
>> > This allows to position the .reloc section correctly in the output
>> > binary, or else the linker might place .reloc before the .text
>> > section.
>> >
>> > Note that the .reloc section is moved before .bss for two reasons: in
>> > order for the resulting binary to not contain any section with data
>> > after .bss, so that the file size can be smaller than the loaded
>> > memory size, and because the data it contains is read-only, so it
>> > belongs with the other sections containing read-only data.
>>
>> While this may be fine for ELF, I'm afraid it would be calling for
>> subtle issues with xen.efi (i.e. the PE binary): There a .reloc
>> section is generally expected to come after "normal" data
>> sections.
>
> OK, would you like me to leave the .reloc section at the previous
> position for EFI builds then?
Well, this part is a requirement, not a question of me liking you
to do so.
> Or do we prefer to leave .reloc orphaned in the ELF build?
Daniel might have an opinion here with his plans to actually
add relocations there in the non-linker-generated-PE build. I
don't have a strong opinion either way, as long as the
current method of building gets left as is (or even simplified).
Also a remark regarding the title - in my builds there already is
a .reloc section in the ELF images, so "add" doesn't really seem
correct to me. It sits right after .rodata, and I would it doesn't
get folded into there because - for some reason - .rodata is
actually marked writable.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-21 6:34 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 11:02 [Xen-devel] [PATCH 0/4] x86: build with llvm 8 linker Roger Pau Monne
2019-06-19 11:02 ` [Xen-devel] [PATCH 1/4] xz: use initconst for hypervisor build Roger Pau Monne
2019-06-19 11:09 ` Andrew Cooper
2019-06-19 11:43 ` Jan Beulich
2019-06-19 11:50 ` Jan Beulich
2019-06-19 14:44 ` Roger Pau Monné
2019-06-19 11:02 ` [Xen-devel] [PATCH 2/4] x86/linker: use DECL_SECTION uniformly Roger Pau Monne
2019-06-19 11:12 ` Andrew Cooper
2019-06-19 11:02 ` [Xen-devel] [PATCH 3/4] x86/linker: add a reloc section to ELF binary Roger Pau Monne
2019-06-19 11:20 ` Andrew Cooper
2019-06-19 11:56 ` Jan Beulich
2019-06-19 14:30 ` Roger Pau Monné
2019-06-19 14:37 ` Jan Beulich
2019-06-19 12:57 ` Jan Beulich
2019-06-19 15:06 ` Roger Pau Monné
2019-06-21 6:34 ` Jan Beulich [this message]
2019-06-21 11:46 ` Roger Pau Monné
2019-06-21 12:07 ` Jan Beulich
2019-06-21 13:41 ` Roger Pau Monné
2019-06-24 11:24 ` Daniel Kiper
2019-06-25 8:10 ` Roger Pau Monné
2019-06-25 9:18 ` Jan Beulich
2019-06-25 11:08 ` Roger Pau Monné
2019-06-25 12:48 ` Roger Pau Monné
2019-06-25 14:18 ` Jan Beulich
2019-06-25 14:11 ` Jan Beulich
2019-06-19 11:02 ` [Xen-devel] [PATCH 4/4] x86: check for multiboot{1, 2} header presence Roger Pau Monne
2019-06-19 11:11 ` Andrew Cooper
2019-06-19 11:20 ` Roger Pau Monné
2019-06-19 11:23 ` Andrew Cooper
2019-06-19 13:08 ` Jan Beulich
2019-06-19 14:40 ` Roger Pau Monné
2019-06-21 6:24 ` 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=5D0C7A650200007800239F04@prv1-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=daniel.kiper@oracle.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.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 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 NNTP newsgroup(s).