diff options
author | Keir Fraser <keir@xen.org> | 2010-11-04 16:37:29 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-11-04 16:37:29 +0000 |
commit | f2136c61335271251b5e692b2efe66bca0b9bd04 (patch) | |
tree | 08e7f15737a981060632bd16ba09da4a65bb525f /xen/common/libelf | |
parent | 0cd09703b178259c90832e4393ac8315ae340f2f (diff) | |
download | xen-f2136c61335271251b5e692b2efe66bca0b9bd04.tar.gz xen-f2136c61335271251b5e692b2efe66bca0b9bd04.tar.bz2 xen-f2136c61335271251b5e692b2efe66bca0b9bd04.zip |
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@novell.com>
Diffstat (limited to 'xen/common/libelf')
-rw-r--r-- | xen/common/libelf/Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
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 $@ $^ |