ia64/xen-unstable

view config/SunOS.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 89d4e80cd1b7
children 9be942ec0247
line source
1 AS = $(CROSS_COMPILE)gas
2 LD = $(CROSS_COMPILE)gld
3 CC = $(CROSS_COMPILE)gcc
4 CPP = $(CROSS_COMPILE)gcc -E
5 AR = $(CROSS_COMPILE)gar
6 RANLIB = $(CROSS_COMPILE)granlib
7 NM = $(CROSS_COMPILE)gnm
8 STRIP = $(CROSS_COMPILE)gstrip
9 OBJCOPY = $(CROSS_COMPILE)gobjcopy
10 OBJDUMP = $(CROSS_COMPILE)gobjdump
12 MSGFMT = gmsgfmt
14 SHELL = bash
16 INSTALL = ginstall
17 INSTALL_DIR = $(INSTALL) -d -m0755
18 INSTALL_DATA = $(INSTALL) -m0644
19 INSTALL_PROG = $(INSTALL) -m0755
21 LIB64DIR = lib/amd64
23 SOCKET_LIBS = -lsocket
24 CURSES_LIBS = -lcurses
25 SONAME_LDFLAG = -h
26 SHLIB_CFLAGS = -R /usr/sfw/$(LIBDIR) -shared
28 ifneq ($(debug),y)
29 # Optimisation flags are overridable
30 CFLAGS ?= -O2 -fno-omit-frame-pointer
31 else
32 # Less than -O1 produces bad code and large stack frames
33 CFLAGS ?= -O1 -fno-omit-frame-pointer
34 endif
36 CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__