ia64/xen-unstable

view Config.mk @ 13631:db3d03dfe92f

add libelf: an ELF binary parser library.

This patch adds a library with a small collection of helper functions
to parse and load elf binaries. The library handles endianess and
elfsize at runtime.

The patch also shuffles around the include files a bit. Now there is
*one* include file holding all the elf structures
(xen/include/public/elfstructs.h) which is included by everyone who
needs them.

It's dead code with this patch only, putting the code into use happens
in followup patches.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
tools/libxc/xc_elf.h | 525 -----------------------------------
xen/arch/x86/boot/mkelf32.c | 2
xen/common/Makefile | 2
xen/common/libelf/Makefile | 4
xen/common/libelf/README | 1
xen/common/libelf/libelf-dominfo.c | 420 ++++++++++++++++++++++++++++
xen/common/libelf/libelf-loader.c | 156 ++++++++++
xen/common/libelf/libelf-private.h | 51 +++
xen/common/libelf/libelf-relocate.c | 345 +++++++++++++++++++++++
xen/common/libelf/libelf-tools.c | 225 +++++++++++++++
xen/include/public/elfstructs.h | 527 ++++++++++++++++++++++++++++++++++++
xen/include/public/libelf.h | 238 ++++++++++++++++
xen/include/xen/elf.h | 490 ---------------------------------
13 files changed, 1972 insertions(+), 1014 deletions(-)
author Emmanuel Ackaouy <ack@xensource.com>
date Thu Jan 25 22:16:52 2007 +0000 (2007-01-25)
parents 4f0a68df2585
children 2cf842558b2e
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/ppc/powerpc/ -e s/i86pc/x86_32/)
8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
9 XEN_OS ?= $(shell uname -s)
11 ifeq ($(XEN_TARGET_ARCH),x86_32)
12 XEN_TARGET_X86_PAE ?= y
13 endif
15 CONFIG_$(XEN_OS) := y
17 SHELL ?= /bin/sh
19 # Tools to run on system hosting the build
20 HOSTCC = gcc
21 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
23 DISTDIR ?= $(XEN_ROOT)/dist
24 DESTDIR ?= /
26 include $(XEN_ROOT)/config/$(XEN_OS).mk
27 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
29 ifneq ($(EXTRA_PREFIX),)
30 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
31 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
32 endif
34 # cc-option
35 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
36 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
37 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
39 ifneq ($(debug),y)
40 CFLAGS += -DNDEBUG
41 else
42 CFLAGS += -g
43 endif
45 CFLAGS += -std=gnu99
47 CFLAGS += -Wall -Wstrict-prototypes
49 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
50 # result of any casted expression causes a warning.
51 CFLAGS += -Wno-unused-value
53 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
54 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
56 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
57 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
59 # If ACM_SECURITY = y, then the access control module is compiled
60 # into Xen and the policy type can be set by the boot policy file
61 # y - Build the Xen ACM framework
62 # n - Do not build the Xen ACM framework
63 ACM_SECURITY ?= n
65 # If ACM_SECURITY = y and no boot policy file is installed,
66 # then the ACM defaults to the security policy set by
67 # ACM_DEFAULT_SECURITY_POLICY
68 # Supported models are:
69 # ACM_NULL_POLICY
70 # ACM_CHINESE_WALL_POLICY
71 # ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
72 # ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
73 ACM_DEFAULT_SECURITY_POLICY ?= ACM_NULL_POLICY
75 # Optional components
76 XENSTAT_XENTOP ?= y
77 VTPM_TOOLS ?= n
78 LIBXENAPI_BINDINGS ?= n
79 XENFB_TOOLS ?= n
81 -include $(XEN_ROOT)/.config