diff options
-rw-r--r-- | xen/arch/ia64/xen/xen.lds.S | 8 | ||||
-rw-r--r-- | xen/arch/x86/xen.lds.S | 4 | ||||
-rw-r--r-- | xen/common/libelf/Makefile | 13 |
3 files changed, 20 insertions, 5 deletions
diff --git a/xen/arch/ia64/xen/xen.lds.S b/xen/arch/ia64/xen/xen.lds.S index f642a93dc0..46e9421743 100644 --- a/xen/arch/ia64/xen/xen.lds.S +++ b/xen/arch/ia64/xen/xen.lds.S @@ -120,7 +120,13 @@ SECTIONS } .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) - { *(.init.data) } + { + *(.init.rodata) + *(.init.rodata.str*) + *(.init.data) + *(.init.data.rel) + *(.init.data.rel.*) + } .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 2bc66042de..1ffd4e98de 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -79,7 +79,11 @@ SECTIONS _einittext = .; } :text .init.data : { + *(.init.rodata) + *(.init.rodata.str*) *(.init.data) + *(.init.data.rel) + *(.init.data.rel.*) } :text . = ALIGN(32); .init.setup : { diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index a586e1ae12..854e738089 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -1,4 +1,9 @@ -obj-y += libelf-tools.o -obj-y += libelf-loader.o -obj-y += libelf-dominfo.o -#obj-y += libelf-relocate.o +obj-y := libelf.o + +SECTIONS := text data rodata $(foreach n,1 2 4 8,rodata.str1.$(n)) $(foreach r,rel rel.ro,data.$(r) data.$(r).local) + +libelf.o: libelf-temp.o Makefile + $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ + +libelf-temp.o: libelf-tools.o libelf-loader.o libelf-dominfo.o #libelf-relocate.o + $(LD) $(LDFLAGS) -r -o $@ $^ |