WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libelf: move to init text/data when built

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libelf: move to init text/data when built for the hypervisor
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Nov 2010 16:50:37 -0700
Delivery-date: Thu, 04 Nov 2010 16:53:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1288888649 0
# Node ID 479abd70ebba30594b1a2dcc17cd62c4157d491f
# Parent  cb82fbef33666d61d7bfd5714bef076f928db6f7
libelf: move to init text/data when built for the hypervisor

Rather than annotating each and every function and data object (and
then still missing some compiler generated ones, plus getting into
ugliness due to the code also being built from tools/libxc/), use
objcopy to rename all relevant sections.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/ia64/xen/xen.lds.S |    8 +++++++-
 xen/arch/x86/xen.lds.S      |    4 ++++
 xen/common/libelf/Makefile  |   13 +++++++++----
 3 files changed, 20 insertions(+), 5 deletions(-)

diff -r cb82fbef3366 -r 479abd70ebba xen/arch/ia64/xen/xen.lds.S
--- a/xen/arch/ia64/xen/xen.lds.S       Thu Nov 04 16:36:37 2010 +0000
+++ b/xen/arch/ia64/xen/xen.lds.S       Thu Nov 04 16:37:29 2010 +0000
@@ -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 -r cb82fbef3366 -r 479abd70ebba xen/arch/x86/xen.lds.S
--- a/xen/arch/x86/xen.lds.S    Thu Nov 04 16:36:37 2010 +0000
+++ b/xen/arch/x86/xen.lds.S    Thu Nov 04 16:37:29 2010 +0000
@@ -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 -r cb82fbef3366 -r 479abd70ebba xen/common/libelf/Makefile
--- a/xen/common/libelf/Makefile        Thu Nov 04 16:36:37 2010 +0000
+++ b/xen/common/libelf/Makefile        Thu Nov 04 16:37:29 2010 +0000
@@ -1,4 +1,9 @@ obj-y += libelf-tools.o
-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 $@ $^

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libelf: move to init text/data when built for the hypervisor, Xen patchbot-unstable <=