[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xen/link: Move .data.rel.ro sections into .rodata for final link



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: smime.p7s
Description: S/MIME cryptographic signature

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.