[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] x86/linker: add a reloc section to ELF binary
On Wed, Jun 19, 2019 at 12:20:40PM +0100, Andrew Cooper wrote: > On 19/06/2019 12:02, Roger Pau Monne wrote: > > If the hypervisor has been built with EFI support (ie: multiboot2). > > Seeing as this continues the sentence from the subject, it should start > without a capital. Otherwise the result is werd to read. > > > This allows to position the .reloc section correctly in the output > > binary, or else the linker might place .reloc before the .text > > section. > > Really? How can this be a legitimate transformation for the linker to make? I've already submitted a bug report: https://bugs.llvm.org/show_bug.cgi?id=42327 GNU ld behaviour is to place orphaned sections at the end. > > > > 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. > > The content of .relocs is transformed via mkreloc to become > __base_relocs_{start,end} and shouldn't exist into the final linked > image AFAICT. __base_relocs_{start/end} is actually what's contained in the .relocs section, or at least that was mny impression based on the contents of xen/arch/x86/efi/relocs-dummy.S > Since the MB1/MB2 builds aren't relocatable, I think we might be able to > get away with simply excluding them in the non-EFI build. Hm, OK. I'm slightly loss then. I've taken a look at the history of xen/arch/x86/efi/relocs-dummy.S and it's not clear to me why such a dummy file was added. My guess is that it's done in order to prevent missing symbols errors. If that's the case I guess the code that makes use of such symbols can be guarded, and the dummy file removed? Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |