xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org
Subject: Re: xen/link: Move .data.rel.ro sections into .rodata for final link
Date: Mon, 31 Jul 2017 11:15:55 +0100	[thread overview]
Message-ID: <1501496155.4771.243.camel@infradead.org> (raw)
In-Reply-To: <597EFEFA020000780010300D@prv-mh.provo.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 2708 bytes --]

On Mon, 2017-07-31 at 03:57 -0600, Jan Beulich wrote:
> Are there any such relocations? The compiler shouldn't emit data needing
> relocation to .rodata, so if at all such might live in assembly code. But yes,
> if there are any, things would have been latently broken even before.


 $ git diff 33a0b4fe90f1ef1a104dd454c931bb46d417ffca^
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 93ead6e..aa25dd9 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -194,7 +194,7 @@ $(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o $(BASEDIR)/
        if $(guard) false; then rm -f $@; echo 'EFI support disabled'; \
        else $(NM) -pa --format=sysv $(@D)/$(@F) \
                | $(BASEDIR)/tools/symbols --xensyms --sysv --sort >$(@D)/$(@F).map; fi
-       rm -f $(@D)/.$(@F).[0-9]*
+       #rm -f $(@D)/.$(@F).[0-9]*
 
 efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: $(BASEDIR)/arch/x86/efi/built_in.o
 efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: ;
diff --git a/xen/arch/x86/efi/mkreloc.c b/xen/arch/x86/efi/mkreloc.c
index bddcce0..55d14a7 100644
--- a/xen/arch/x86/efi/mkreloc.c
+++ b/xen/arch/x86/efi/mkreloc.c
@@ -346,6 +346,7 @@ int main(int argc, char *argv[])
              memcmp(sec1[i].name, ".lockpro", sizeof(sec1[i].name)) == 0 )
             continue;
 
+       printf("# section %.*s\n", (int)sizeof(sec1[i].name), sec1[i].name);
         if ( !sec1[i].rva )
         {
             fprintf(stderr, "Can't handle section %u with zero RVA\n", i);
 $ grep -A36 rodata .xen.efi.0r.S
# section .rodata
	.equ rva_00200000_relocs, 0x00000c
	.balign 4
	.long 0x41b000, rva_0041b000_relocs
	.word (10 << 12) | 0x920
	.word (10 << 12) | 0x928
	.word (10 << 12) | 0x930
	.word (10 << 12) | 0x938
	.word (10 << 12) | 0x940
	.word (10 << 12) | 0x948
	.word (10 << 12) | 0x950
	.word (10 << 12) | 0x958
	.word (10 << 12) | 0x960
	.word (10 << 12) | 0x968
	.word (10 << 12) | 0x970
	.word (10 << 12) | 0x978
	.word (10 << 12) | 0x980
	.word (10 << 12) | 0x988
	.word (10 << 12) | 0x990
	.word (10 << 12) | 0x998
	.word (10 << 12) | 0x9a0
	.word (10 << 12) | 0x9a8
	.word (10 << 12) | 0x9b0
	.word (10 << 12) | 0x9b8
	.word (10 << 12) | 0x9c0
	.word (10 << 12) | 0x9c8
	.word (10 << 12) | 0x9d0
	.word (10 << 12) | 0x9d8
	.word (10 << 12) | 0x9e0
	.word (10 << 12) | 0x9e8
	.word (10 << 12) | 0x9f0
	.word (10 << 12) | 0x9f8
	.word (10 << 12) | 0xa00
	.word (10 << 12) | 0xa08
	.word (10 << 12) | 0xa10
	.word (10 << 12) | 0xa18
# section .init.te

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 4938 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-07-31 10:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 15:20 xen/link: Move .data.rel.ro sections into .rodata for final link David Woodhouse
2017-07-20 16:46 ` Wei Liu
2017-07-20 16:54   ` Wei Liu
2017-07-21 10:43     ` Julien Grall
2017-07-21 16:41       ` Andrew Cooper
2017-07-25  9:21 ` [PATCH v2] " David Woodhouse
2017-07-30  6:16 ` Jan Beulich
2017-07-30 12:50   ` Andrew Cooper
2017-07-30 23:18     ` David Woodhouse
2017-07-31  9:57       ` Jan Beulich
2017-07-31 10:15         ` David Woodhouse [this message]
2017-07-31  9:55     ` Jan Beulich
2017-07-31 11:02   ` David Woodhouse
2017-07-31 13:15     ` Jan Beulich
2017-07-31 15:56       ` David Woodhouse
2017-08-02  9:17         ` Jan Beulich
2017-08-02 11:30           ` [PATCH] x86/efi: Do not write relocations in efi_arch_relocate_image() first pass David Woodhouse
2017-08-02 11:56             ` Jan Beulich
2017-08-02 12:11               ` David Woodhouse
2017-08-02 13:58                 ` Jan Beulich
2017-08-02 14:45                   ` David Woodhouse
2017-08-02 15:16                     ` Jan Beulich
2017-08-02 15:56                       ` David Woodhouse
2017-08-02 11:43           ` xen/link: Move .data.rel.ro sections into .rodata for final link David Woodhouse

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=1501496155.4771.243.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.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 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).