[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Use i386 vsyscall.lds.S rather than hardcoding our own.
ChangeSet 1.1881.1.1, 2005/05/21 00:12:17+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx Use i386 vsyscall.lds.S rather than hardcoding our own. Signed-off-by: Chris Wright <chrisw@xxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> b/linux-2.6.11-xen-sparse/arch/xen/Makefile | 8 + b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile | 9 + linux-2.6.11-xen-sparse/arch/xen/i386/kernel/vsyscall.lds | 69 -------------- 3 files changed, 13 insertions(+), 73 deletions(-) diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/Makefile b/linux-2.6.11-xen-sparse/arch/xen/Makefile --- a/linux-2.6.11-xen-sparse/arch/xen/Makefile 2005-05-20 20:05:48 -04:00 +++ b/linux-2.6.11-xen-sparse/arch/xen/Makefile 2005-05-20 20:05:48 -04:00 @@ -37,8 +37,14 @@ @rm -f $@ @ln -fsn $(XENARCH) $@ +arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ + include/config/MARKER + +include/asm-$(ARCH)/asm_offsets.h: arch/$(XENARCH)/kernel/asm-offsets.s + $(call filechk,gen-asm-offsets) + prepare: include/.asm-ignore include/asm-xen/asm \ - arch/xen/arch ; + arch/xen/arch include/asm-$(ARCH)/asm_offsets.h ; all: vmlinuz diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile 2005-05-20 20:05:48 -04:00 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile 2005-05-20 20:05:48 -04:00 @@ -51,18 +51,21 @@ # Note: kbuild does not track this dependency due to usage of .incbin $(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so) +targets += vsyscall.lds # The DSO images are built using a special linker script. quiet_cmd_syscall = SYSCALL $@ cmd_syscall = $(CC) -nostdlib -m32 $(SYSCFLAGS_$(@F)) \ -Wl,-T,$(filter-out FORCE,$^) -o $@ +export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH) + vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags) SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags) $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \ -$(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE +$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE $(call if_changed,syscall) # We also create a special relocatable object that should mirror the symbol @@ -73,11 +76,11 @@ $(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o SYSCFLAGS_vsyscall-syms.o = -r -$(obj)/vsyscall-syms.o: $(obj)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE +$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE $(call if_changed,syscall) c-link := init_task.o -s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o +s-link := vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)): @ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@ diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/vsyscall.lds b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/vsyscall.lds --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/vsyscall.lds 2005-05-20 20:05:48 -04:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,69 +0,0 @@ -/* - * Linker script for vsyscall DSO. The vsyscall page is an ELF shared - * object prelinked to its virtual address, and with only one read-only - * segment (that fits in one page). This script controls its layout. - */ - -/* This must match <asm/fixmap.h>. */ -/* = FIXADDR_TOP - PAGE_SIZE - = HYPERVISOR_VIRT_START - 2 * PAGE_SIZE - PAGE_SIZE */ -VSYSCALL_BASE = 0xfbffd000; - -SECTIONS -{ - . = VSYSCALL_BASE + SIZEOF_HEADERS; - - .hash : { *(.hash) } :text - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - - /* This linker script is used both with -r and with -shared. - For the layouts to match, we need to skip more than enough - space for the dynamic symbol table et al. If this amount - is insufficient, ld -shared will barf. Just increase it here. */ - . = VSYSCALL_BASE + 0x400; - - .text : { *(.text) } :text =0x90909090 - - .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr - .eh_frame : { KEEP (*(.eh_frame)) } :text - .dynamic : { *(.dynamic) } :text :dynamic - .useless : { - *(.got.plt) *(.got) - *(.data .data.* .gnu.linkonce.d.*) - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - } :text -} - -/* - * We must supply the ELF program headers explicitly to get just one - * PT_LOAD segment, and set the flags explicitly to make segments read-only. - */ -PHDRS -{ - text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ - dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ - eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ -} - -/* - * This controls what symbols we export from the DSO. - */ -VERSION -{ - LINUX_2.5 { - global: - __kernel_vsyscall; - __kernel_sigreturn; - __kernel_rt_sigreturn; - - local: *; - }; -} - -/* The ELF entry point can be used to set the AT_SYSINFO value. */ -ENTRY(__kernel_vsyscall); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |